We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I’m working with MODx 2.1.2-pl with getResources 1.3.1-pl

    I’ve got a getResource call in my footer on the page like so that is simply a company address:

    [[!getResources? &resources=`20` &limit=`1` &tpl=`content_tpl` &includeContent=`1`]]


    It works fine throughout the site. The homepage is a container and the getResources works fine in the footer on this page. But I’ve got 2 Resources that are also containers that have the same footer and getResources is really messing up in the footer on these pages. On one Resource I also have another getResources call for a basic biography setup (name and text) and getResources in the footer is outputting the text from one of those bios. On another Resource that is a container (but not another instance of getResources), getResources is outputting an array in the footer...when I remove the Resources under it and it’s no longer a container, the footer getResources works correctly and the array disappears. Seems that I need to assign ID’s to each instance of getResources or does the Resource being a container cause problems?
      Precision Web Development ... SmashStack.com
    • You need to specify the parents property here or it will be the current resource, causing you to get different results depending on the page it is being called from. Just set &parents=`-1` if your intention is to include only the Resource with an id of 20.
      • Very cool...thanks Jason...that did the trick. Greatly appreciated!
          Precision Web Development ... SmashStack.com