New to MODx, so far I’m liking it... but I’m stuck on writing an if statement for my template. Here’s what I’m trying to accomplish: (If I’m on the About page, I want to output a class - I’m using this for my menu)
If Page = ’About’ Then Print ’class="active"’
How do I do this?
How is your menu being generated ??
If you use Wayfinder for the menu then it gives the active class to the page that you are on and also a class of first and last to the relevant menu items
yeah I’m not using the wayfinder method. how do I go about using the wayfinder method? my menu looks like this:
<ul id="menu">
<li class="active">Home</li>
<li>Product</li>
<li>About</li>
<li>News</li>
<li>Contact</li>
<li>Subscribe</li>
</ul>