Welcome Guest, Not a member yet? Register   Sign In
achor highlighting
#2

[eluser]Gavin Blair[/eluser]
This may be slightly shorter:

<li>&lt;?php if($page=='help') $attributes = array( 'class' => 'current' ); echo anchor('start/help', 'Hilfe', $attributes); ?&gt;</li>

(in your css, make sure .current { font-weight: bold; } )

But I tend to use html anchors:

<li><a href="&lt;?=base_url()?&gt;index.php/start/help" class="&lt;?=($page == 'help') ? 'current' : '' ?&gt;">Hilfe</a>

This is the shortest and seems the easiest to read.

Hope this helps!


Messages In This Thread
achor highlighting - by El Forum - 06-10-2008, 06:49 AM
achor highlighting - by El Forum - 06-10-2008, 07:02 AM
achor highlighting - by El Forum - 06-10-2008, 07:16 AM
achor highlighting - by El Forum - 06-10-2008, 07:18 AM
achor highlighting - by El Forum - 06-10-2008, 07:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB