We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    ok - I’m trying to build a sitemap with get resources, not sure if this is the easiest/best way:

    I’m calling the initial top level items like this:
    [[!getResources? 
         &tpl=`SiteMapItem` 
         &parents=`0` 
         &depth=`0` 
         &limit=`9999` 
         &includeContent=`1` 
         &showHidden=`0` 
         &hideContainers=`0` 
         &sortby=`id`
         &sortdir=`asc`
    ]]
    


    Then in the SiteMapItem template [very ’testing’ very ’beta’]:
    <div style="float:left;padding-left:15px;width:100%;">
    (<a href="[[~[[+id]]]]">[[+id]]</a>) [[+pagetitle]] - [[+longtitle]] - [[+publishdate]] - [[+introtext]].......
    [[!getResources? &tpl=`SiteMapItem` &parents=`[[+id]]` &depth=`0` &limit=`9999` &includeContent=`1` &showHidden=`0` &hideContainers=`0` ]]
    <br />
    </div>
    



    and it works, I’m concerned that it calls getResources around 100 times, yes I can [and will cache] it, but is there a better/more efficient way to do this?

    -thanks
    -sean

    PS> I thought about using wayFinder, but I need to pull the +introtext from each resource [among other items]


      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525