Welcome Guest, Not a member yet? Register   Sign In
html helper: ul()
#1

[eluser]fdog[/eluser]
I want to generate an ul using the HTML helper. I need to add a class attribute to an li.

desired output:
Code:
<ul>
    <li class="current_page_item">
        <a href="#">home</a>
    </li>
    <li>
        <a href="#">photos</a>
    </li>
    <li>
        <a href="#">about</a>
    </li>
</ul>

current controller:
Code:
$menu = array(
          'home',
          'photos',
          'about',
         );

$attributes = array(
                    'class' => 'current_page_item'
                   );

Is there a way to pass $attributes to a li instead of the whole ul?


Messages In This Thread
html helper: ul() - by El Forum - 02-10-2008, 05:42 PM
html helper: ul() - by El Forum - 02-10-2008, 06:45 PM
html helper: ul() - by El Forum - 02-10-2008, 06:50 PM
html helper: ul() - by El Forum - 02-10-2008, 06:51 PM
html helper: ul() - by El Forum - 02-10-2008, 06:53 PM
html helper: ul() - by El Forum - 02-10-2008, 06:55 PM
html helper: ul() - by El Forum - 02-10-2008, 06:58 PM
html helper: ul() - by El Forum - 02-10-2008, 07:03 PM
html helper: ul() - by El Forum - 02-10-2008, 07:09 PM
html helper: ul() - by El Forum - 02-10-2008, 07:13 PM
html helper: ul() - by El Forum - 02-10-2008, 07:23 PM
html helper: ul() - by El Forum - 11-15-2008, 01:16 PM
html helper: ul() - by El Forum - 11-15-2008, 01:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB