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

[eluser]Référencement Google[/eluser]
Yes right, sorry it's little bit late (2:20 night time here...)
I see 2 possible solutions to extend it to that possibility, we can add another parameter to the function:

function _list($type = 'ul', $list, $attributes = '', $li_attributes = '', $depth = 0)

Or we can check in the $attributes array if there is one key named for example "li_attribute" (I don't like this solution too much, looks overcomplicated)

What do you think would be better to start with?

@fdog: Don't forget CI 1.6 allows you to extend the helpers functions if you can't wait the official CI one ;-)

Bringing an old topic back to life: Did anybody ever figure out how we could get the html helper to allow the addition of an attribute to the li in a list?

I too would like to use the html helper in a dynamic menu situation but need to be able to add an attribute to the <li id="xxxx">

Anybody successfully extend the html helper to do this?

[eluser]Derek Allard[/eluser]
No, you'd need to manually build the markup yourself (or write your own helper). Wink

Theme © iAndrew 2016 - Forum software by © MyBB