We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42596
    • 45 Posts
    Hello fellow MODX'ers!

    Take a look at my code:

    <li class="[[If?
       &subject=`[[+isCallToAction]]`
       &operator=`EQ`
       &operand=`Yes`
       &then=`cta-orange`
       &else=`menu-item-gray`
    ]]">
    	<a href="[[+wf.link]]">[[+wf.linktext]]</a>
    </li>


    That is a chunk template for Wayfinder...is it possible to use If like this? It always returns menu-item-gray. The TV is a drop down menu with the options yes or no. If I put [[+isCallToAction]] just below the a tag by itself then it outputs the correct info but it doesnt seem to work with the if statement.

    Sorry if this is too brief, please ask questions if you have any.

    Also I wasnt 100% sure if this was posted in the best place but I couldnt find anything better. MODS, feel free to move it.

    Thanks!
      • 42596
      • 45 Posts
      Sorry I posted this 3 times...I was getting a DB error on submit and didnt know they were going though...and I cant see how to delete the others....