• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.