On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I have been creating a search results page with SimpleSearch.
    I got a blank results page every time I did a search even though I'd set it up exactly as I had in other sites.
    So I decided to make a new page with a Content template (standard page in the site) and preview that.
    It shows up in the menu but when you click the menu item you get a blank page and no HTML is rendered.

    However, if I make the page a child of another page it does render.
    Furthermore, all the previous pages that use Content that have been published before still function.

    Same thing happens with any templates. At the root level they do not render. Once they are children, they render.

    Using 2.2.6 on the MODX Cloud Beta plan. Expires Tuesday, plan to purchase before then of course.
    • Found the issue.

      In some templates I had this:

      <h2>[[[[*isfolder:is=`1`:then=`$pagetitle`:else=`$parentpagetitle`]]]]</h2>


      In the $pagetitle chunk I just had: [[*pagetitle]]

      In the $parentpagetitle chunk I had:
      [[#[[*parent]].pagetitle]]


      Which is useable by fastField.

      When any pages that were either folders or children that used templates with this command they rendered. When they were not either, they did not.

      I changed $parentpagetitle to:
      [[getResourceField? &id=`[[UltimateParent]]` &field=`pagetitle`]]


      Tried:
      [[#[[UltimateParent]].pagetitle]]


      But it didn't seem to work.
      • <h2>[[[[*isfolder:is=`1`:then=`$pagetitle`:else=`$parentpagetitle`]]]]</h2>

        You would need to add a check for parent being 0 along with the isfolder check. The whole modifier becomes too complex, and a snippet would probably be more efficient.

          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
        • Quote from: sottwell at Dec 15, 2012, 05:54 AM
          <h2>[[[[*isfolder:is=`1`:then=`$pagetitle`:else=`$parentpagetitle`]]]]</h2>

          You would need to add a check for parent being 0 along with the isfolder check. The whole modifier becomes too complex, and a snippet would probably be more efficient.


          I'll ask my programmer to do just that when he gets back.