1
JammerPro
Conditional {if} statement
  • 2011/10/8 20:11

  • JammerPro

  • Just popping in

  • Posts: 39

  • Since: 2008/8/24


Here's the code:

<ul>
      
     <
li><<{if $xoops_dirname eq "mastop_publish"}>class="active"<{/if}> href="<{$xoops_url}>/modules/mastop_publish"><span>Features</span></a></li>
        
     <
li><<{if $xoops_dirname eq "mastop_publish"}>class="active"<{/if}> href="<{$xoops_url}>/modules/mastop_publish"><span>Demo</span></a></li>

</
ul>


If the class is active, only the menu bar button should light up for the selection. However, that's not what's happening above because the class is active for more than one choice. When you click on either the "Features" button or "Demo" button, both menu buttons become active and light up because "$xoops_dirname eq mastop_publishing" is the same for both!

I tried adding "&& $xoops_pagetitle=="Features"" to the code to distinguish between the buttons, but that did not work.

Any suggestions would be appreciated!



2
Alanbax
Re: Conditional {if} statement
  • 2012/5/3 19:26

  • Alanbax

  • Just popping in

  • Posts: 23

  • Since: 2012/4/21


I'm using a similar idea on a site I'm building at the moment.
You could try this layout. Hopefully it will work.

Quote:
<a id="button-about" href="<{$xoops_url}>/modules/fmcontent/"<{if $xoops_dirname=='fmcontent'}> class="selected"<{/if}>><span>About Us</span><img src="<{$xoops_imageurl}>images/about.png" /></a>


Alan

Login

Who's Online

287 user(s) are online (184 user(s) are browsing Support Forums)


Members: 0


Guests: 287


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits