We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I'm curious to see how the two might work together. It ought to give faster searching and sorting.
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 3749
      • 24,544 Posts
      I'm curious to see how the two might work together. It ought to give faster searching and sorting.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 1887
        • 50 Posts
        Thanks all for the suggestions.

        The combination of pdoResources and conditionalTpls has dropped the page time from 0.8 secs to 0.1 secs so many thanks for the good advice.

        If it helps others, I am using:
        [[!pdoResources?
            &parents=`198`
            &limit=`0`
            &depth=`1`
            &includeContent=`1`
        	&includeTVs=`installer_level,installer_region,installer_address,installer_locality,installer_postcode,installer_tel,installer_email,installer_url,
        	    installer_email,installer_image,gmarker_latitude,gmarker_longitude`
        	&showHidden=`1`
        	&processTVs=`0`
        	&sortby=`{"installer_level":"ASC","pagetitle":"ASC"}`
        	&sortdirTV=`ASC`
        	&tplCondition=`tv.installer_level`
        	&conditionalTpls=`{"level1":"level1_template","level2":"level2_template","level3":"level3_template"}`
        	&tpl=`default_template_which_isnt used_but_is_required`
        	&tvFilters=`installer_region==%'.$_GET['region'].'%`
        ]]'
        


        The next level up would be to use a separate table but that is out side of my comfort zone at the moment. Is the recommendation to move all TV related data into separate tables or just those that one would search or sort by?

        It would be great if it was possible to control this all from the TV tab eg create a normal text TV or create an indexed text TV

        Kind regards

        James
          • 3749
          • 24,544 Posts
          Congratulations. That's in impressive improvement.

          You don't have to move all the TVs. The ones you need to search and sort by are the most important, but I would also move any that will be displayed using a Tpl chunk for multiple users.

          I would probably move all of them since it would be more convenient to have them all in the same place and it's not much more trouble to move the extra ones.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting