We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4853
    • 4 Posts
    Hi, I’m a newbie working with what has been designed by someone else.
    I have the following PHx code controlling what chunks are displayed in the right-hand column of a page, depending what the id of the main page is. An example of the code on the rh-col page is:

    <!-- Display Library information details if proper page -->
    [*phx:if=`[*id*]`:is=`63`:then=`{{librarydetails}}`*]

    I would like to use the same code to show the appropriate chunk, on all pages with a certain parent, ie all children of page id=61.

    I’m not sure of the correct syntax to use here. I’m sure it’s really simple , but I can’t seem to find it in the documentation.

    I imagine it would be something like:

    <!-- Display Library information details if proper page -->
    [*phx:if=`[!UltimateParent!]`:is=`63`:then=`{{librarydetails}}`*]

    Please help!
    Thanks

      • 26931
      • 2,314 Posts
      Hi,
      try
      [*phx:if=`[*parent*]`:is=`63`:then=`{{librarydetails}}`*]

      http://spreadsheets.google.com/pub?key=pHJSI5ye5FxqRfh1nEPCnJA&gid=0
        • 4853
        • 4 Posts
        Wow, thanks for the super speedy reply!

        Yup, that worked perfect, thanks grin