Forum Moderators: coopster

Message Too Old, No Replies

php nav highlighting

         

ads112001

3:14 pm on Aug 8, 2011 (gmt 0)

10+ Year Member



Working with highlighting tabs for my nav. It works except when a page has an $areaKey set to something other than 8 listed below. So when i have a page with $areaKey set to "common" all links are highlighting and getting a class of "current"

<ul id="nav">
<li<?php if($areaKey == 'home'){echo ' class=\"current\"';} ?>><a href="/index.html">Home</a></li>
<li<?php if($areaKey == 'playing'){echo ' class=\"current\"';} ?>><a href="/playing/">Playing</a></li>
<li<?php if($areaKey == 'staying'){echo ' class=\"current\"';} ?>><a href="/staying/">Staying</a></li>
<li<?php if($areaKey == 'dining'){echo ' class=\"current\"';} ?>><a href="/dining/">Dining</a></li>
<li<?php if($areaKey == 'entertainment'){echo ' class=\"current\"';} ?>><a href="/entertainment/">Entertainment</a></li>
<li<?php if($areaKey == 'racing'){echo ' class=\"current\"';} ?>><a href="/racing/">Racing</a></li>
<li<?php if($areaKey == 'shopping'){echo ' class=\"current\"';} ?>><a href="/shopping/">Shopping</a></li>
<li<?php if($areaKey == 'groups'){echo ' class=\"current\"';} ?>><a href="/groups/">Groups</a></li>
</ul>

ads112001

3:38 pm on Aug 8, 2011 (gmt 0)

10+ Year Member



NM resolved issue