We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4280
    • 22 Posts
    I’d like to have several conditionals listed on a page, where each chunk will only be displayed if the page (as named in the manager) has the alias of "x". Otherwise, those chunks don’t get displayed. I suppose this could be done with page ids as well, but I prefer alias.

    What is the code syntax to write to make the following happen?

    -->Conditional 1: If this page has the alias name of "x", then display this {{chunk}}, otherwise display nothing.
    -->Conditional 2: If this page has the alias name of "x", then display this {{chunk}}, otherwise display nothing.

    Can this be done (the easier the better) with the native tags in MODx or do I have to install another plugin, etc. to achieve this?

    Thanks!

      • 4280
      • 22 Posts
      Whoo hoo! PHx worked for this scenario. Thanks for the suggestion.