We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    It's possible that the inline tpl with the [[+content]] placeholder is the problem. Try using a chunk tpl instead.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 46039
      • 76 Posts
      Hooly smokes. I figured this out in about 2 minutes as soon as I was looking at it tonight!

      I cannot set tpl @INLINE on a nested getresources call! If I simply create a tpl called content.tpl with:

      [[+content]]


      It seems to work!

      Is this something worth logging as a bug? I'm just gonna go check the docs for a mention of it.

      [EDIT] Susan you beat me to it!

      As usual, massive thanks for your help. I don't know how I seem to constantly stumble across these odd caveats!
      • Actually if you think about it it's logical. That is itself a tpl, being processed by the parent getResources snippet. So what does happen to a placeholder in a tpl? It gets replaced with its value. So you can't have an inline tpl with a placeholder in the child getResources call. Before the child getResources call was run, that placeholder was replaced with the content of that child resource. No wonder the poor thing couldn't produce anything.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org