When I get to write lists, I prefer to put them into an array
containing the important values before parsing them :
Corrections and additions is much simpler :
$links[] = array('index','Overview');
$links[] = array('ask','Asking a question');
...
then use a
foreach($links as $link): ?>
<li <? if ($this->action == $link[0]) echo 'class="active"'; ?>>
<?php $html->link($link[1], array('action' => $link[0])); //using cake
function to create your links ?>
</li>
<?php endforeach;?>
That way, you avoid making mispelling, especially when you have long
lists and possibly complicated descriptions (with images, etc.),
you'll have either 19 html errors or 0 :)
As stated by Joel, you should create your list ($links) into the
controller and send it to your view using the $this->set() function
and use only one element.
just my .02 cents
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---