We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4653
    • 30 Posts
    Hello,

    I’m trying to do a small hack with the wayfinder.
    My target is to set a ul.class only by the page ID’s of 2,3,4 and 5.
    I did this before I used the modx like this:
    <ul <?php echo ($ID == '2')?'class="space"':"";?>  class="main">
    


    My current WF code is:
    <div id="subnav">[[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`3`]]` &outerTpl=`menuContainer` &outerClass=`nav_space`]]
    </div>​
    

    I would like to set the outerClass by pageID=2 &outerClass=`nav_space2`| pageID=3 &outerClass=`nav_space3`and so on.

    all the best
    Carol
      • 22303 MODX Staff
      • 10,725 Posts
      MODx does not support embedding PHP in any of the content other than Snippets. You should be able to accomplish what you are trying to do via the Chunk tpl’s and properties that Wayfinder provides.
        • 4653
        • 30 Posts
        Ok, I got my solution with &rowIdPrefix=`nav` ;-)

        thank for the replay.
        cheers carol