We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    Any ideas why getResources is showing duplicate content for 3 different results?

    I call it like this:

    [[!GetResources? &parents=`5` &limit=`3` &sortby=`id` &showHidden=`1` &includeTVs=`1` &processTVs=`1` &tpl=`CallOutTpl` &tplFirst=`CallOutFirstTpl` &tplLast=`CallOutLastTpl` ]]
    


    the three chunk templates referenced look like:
    tplFirst
    <div class="callout first [[+idx]]">
         [[$CalloutGuts]]
    </div>
    
    tplLast
    <div class="callout last [[+idx]]">
         [[$CalloutGuts]]
    </div>
    
    tpl
    <div class="callout mid [[+idx]]">
         [[$CalloutGuts]]
    </div>
    




    The CalloutGutsfor all three wrappers are:
    <h4>[[+longtitle]]</h4>
    [[+tv.CalloutImage]]
    <div class="text">
    [[+introtext]]
    </div>
    <a class="button learn" href="[[~[[+id]]]]"><span>Learn More</span></a>
    



    The three resources that are children of resource id 5 all have different content, but when these are displayed - all the title, image,introtext and id values are all the same...

    I have tried omitting the sortby parameter as per the docs, but no dice there.

    any thoughts?



    -thanks
    -sean
      *** 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
      • 26503
      • 620 Posts
      ok - I can get it to work if I place the content of the CallOutGuts chunk into each callout tpl, but here I am duplicating code, any ideas how I can do this without duplicating that chunk 3 times?


      -sean
        *** 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
        • 36502 ☆ A M B ☆
        • 491 Posts
        have you tried calling the chunk uncached?
          TilliLab | MODX Ambassador
          website
          • 26503
          • 620 Posts
          one of the first things I did, even tried to call the variables uncached.
            *** 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
            • 22303 MODX Staff
            • 10,725 Posts
            Calling just the chunk uncached should work. Make sure you have upgraded to 2.1.5-pl.