We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28376
    • 222 Posts
    What i want is when somebody is on a certian page where the parent number is 775 it would output this text if not it will output this text. Here is what i have so far


    [+phx:if=`[!UltimateParent!]`:is=`775`:then=`Reviews`:else=`Comments`+]
      • 33337
      • 3,975 Posts
      Do you need UltimateParent? or Parent?

      eg. UltimateParent is top most container in the root. Parent is immediate container of the resource.

      Also, just in case, check if you have PHx installed. Since it doesnt come with default install.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 28376
        • 222 Posts
        Its Parent.
          • 33337
          • 3,975 Posts
          Then use this:

          [+phx:if=`[*parent*]`:is=`775`:then=`Reviews`:else=`Comments`+]
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 36416
            • 589 Posts
            Quote from: zi at Jul 02, 2010, 01:34 AM

            Then use this:
            [+phx:if=`[*parent*]`:is=`775`:then=`Reviews`:else=`Comments`+]


            ...or this (shorter) variant:

            1. calculated value
            [+phx:input=`[!UltimateParent!]`:is=`775`:then=`Reviews`:else=`Comments`+]


            2. field value
            [*parent:is=`775`:then=`Reviews`:else=`Comments`*]