We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    I have a getResources call which is really very simple. It'd supposed to get the Content field of a resource (26) and pull it onto every page using a tpl called Get-Random-Quote

    My getResources call
    [[!getResources? &tpl=`Get-Quote` &parents=`26` &limit=`1` &includeContent=`1` &showHidden=`1` &hideContainers=`1` &cache=`0`]]



    My Chunk (Get-Quote)
    <h1>[[*content]]</h1>


    The problem I have is that getResources is pulling in the Content of the current page I am browsing instead of my target which should be 26.

    I'm using 2.2.0-rc3 (traditional). Is this a known bug?
    Meeting with client tomorrow and hoping to fix today. Thanks.

      ...
      • 3749
      • 24,544 Posts
      You want this:

      <h1>[[+content]]</h1>


      Using a content tag like *fieldName will always get the value for the current page. In a Tpl chunk, you want a placeholder tag instead:

      [[+fieldName]]
        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
        • 37042
        • 384 Posts
        Belated thanks, Bob. That sorted it.
          ...