We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    I have modified the results.tpl.html as follows:

    <div>
    <a href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
    <div>
    <img src="[+as.legoImages+]" height=" 
    [+as.legoImages:imgmaxheight=`120`+]"/>
    </div>
    [+as.extractShow:is=`1`:then=`
    <div><p>[+as.extract+]</p></div>
    `+]
    [+as.breadcrumbsShow:is=`1`:then=`
    <span>[+as.breadcrumbs+]</span>
    `+]
    </div>
    


    The imgmaxheight gives me return images with uniform height, in the past I was able to implement phpthumb or fckeditor thumb workaround, I just cant remember how? If I were to make the div in this html a div id (for example container 1) and modified the css to how I want it would that have an impact?

    With the code you mentioned above, I put the results Div in the sidebar because my Ajax call is located there. I am now thinking I needed to put it with the Ajax landing page call rather than the Searchbar call? Sorry for any confusion I am just trying to get my head around things and seem to be struggling a bit. Thanks for all your posts so far
    Regards

    SB
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
    • discuss.answer
      • 13226
      • 953 Posts
      Thats a starting point, change:
      <div>
      <a href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
      <div>
      <img src="[+as.legoImages+]" height="
      [+as.legoImages:imgmaxheight=`120`+]"/>
      </div>
      [+as.extractShow:is=`1`:then=`
      <div><p>[+as.extract+]</p></div>
      `+]
      [+as.breadcrumbsShow:is=`1`:then=`
      <span>[+as.breadcrumbs+]</span>
      `+]
      </div>


      Into:
      <li>
      <a href="[+as.resultLink+]" title="[+as.longtitle+]">[+as.pagetitle+]</a>
      <div>
      <img src="[+as.legoImages+]" height="
      [+as.legoImages:imgmaxheight=`120`+]"/>
      </div>
      [+as.extractShow:is=`1`:then=`
      <div><p>[+as.extract+]</p></div>
      `+]
      [+as.breadcrumbsShow:is=`1`:then=`
      <span>[+as.breadcrumbs+]</span>
      `+]
      </li>


      Save and refresh - this should put each element in a list element.

      Once that works, the wrapping template needs to be found and modified, to paste the results into:

      What is required from my example is:
      <div id="results">
      <ul>
      
      </ul>
      </div>
        • 7527
        • 437 Posts
        I've just found the example I did with Modx Revolution. My Results.tpl was changed to this:

        <img class="alignleft" title="[[*tv.Factfile_title]]" src="[[*tv.Fact1:phpthumbof=`w=100&h=100&zc=1`]]" alt="" />


        I have tried to change it to suit Evo but again I must be missing something?

        Regards,
        SB
          www.PawsForWildlife.co.uk
          www.Borntobrick.co.uk
          • 13226
          • 953 Posts
          I see you have made the mod. Have you modified grpResult.tpl.html ?

          Looking at the default template:
          [+as.grpResultsDef:is=`1`:then=`
          <div id="[+as.grpResultId+]" class="ajaxSearch_grpResult">
          [+as.headerGrpResult+]
          [+as.footerGrpResult+]
          [+as.listResults+]
          [+as.footerGrpResult+]
          </div>
          `:else=`
          <div class="ajaxSearch_grpResultName">[+as.grpResultNameShow:is=`1`:then=`[+as.grpResultName+]`+]
          <span class="ajaxSearch_grpResultsDisplayed">[+as.grpResultsDisplayedText+]</span></div>
          `+]


          To test, change it to this:
          [+as.grpResultsDef:is=`1`:then=`
          <div id="[+as.grpResultId+]" class="ajaxSearch_grpResult">
          [+as.headerGrpResult+]
          [+as.footerGrpResult+]
          <div id="results">
          <ul>
          [+as.listResults+]
          </ul>
          </div>
          [+as.footerGrpResult+]
          </div>
          `:else=`
          <div class="ajaxSearch_grpResultName">[+as.grpResultNameShow:is=`1`:then=`[+as.grpResultName+]`+]
          <span class="ajaxSearch_grpResultsDisplayed">[+as.grpResultsDisplayedText+]</span></div>
          `+]


          Once completed we can go from there. I dont know if its the right template, but give it a go
            • 7527
            • 437 Posts
            Sorry posted before I read the reply. Ok my results are in list form (bullet pointed). If I now redo the coding you mentioned above and and the results css is there anything else? I take it the wrapping template is the div 'results'?

            My Ajaxsearch results call is in the contents box of the landing page with Tiny MCE disabled. My understanding is that in the contents block I would put:

            <div id="results">
            <ul>
             ------~My Ajaxsearch landing page call----------
            </ul>
            </div>


            Regards,
            SB
              www.PawsForWildlife.co.uk
              www.Borntobrick.co.uk
              • 13226
              • 953 Posts
              OK, that looks good
                • 13226
                • 953 Posts
                Now you need to add the CSS from the first post
                  • 7527
                  • 437 Posts
                  Ok I have modified GrpResults.tpl.html. I have now added the HTML to my Landing page call, and added the css. My search is available to see here:

                  http://www.borntobrick.co.uk/

                  Regards,
                  SB
                    www.PawsForWildlife.co.uk
                    www.Borntobrick.co.uk
                    • 7527
                    • 437 Posts
                    I guess now I just ammend the results CSS to my liking?
                      www.PawsForWildlife.co.uk
                      www.Borntobrick.co.uk
                      • 13226
                      • 953 Posts
                      Seen, its not working properly.

                      What does the pages content code look like ?

                      Is it still as was in the first post, still like this ?
                      Quote from: distant_smile at Mar 16, 2015, 07:27 AM
                      My HTML is:
                      <div id="results">
                       <h2>Search</h2><h2>
                      		<ul>
                          [!AjaxSearch? &ajaxSearch=`0` &ajaxSearch=`0` &showIntro=`0` &showResults=`0` &landingPage=`9` &advSearch=`allwords`!]
                      	</ul>
                      	 </h2></div>

                      If yes, you need to modify it to something like:
                      <h2>Search</h2>
                      [!AjaxSearch? &ajaxSearch=`0` &ajaxSearch=`0` &showIntro=`0` &showResults=`0` &landingPage=`9` &advSearch=`allwords`!]