CLASS attribute on <li/> using HTML Helper |
Hi all,
I had found the old topic http://forum.codeigniter.com/archive/ind...17276.html from ellislab forum regarding how to apply attributes in <li> elements or nested lists inside <li>. I remember that one of the members of the forum had wrote a very useful extension of the _list() in order to do this, which was working n-level deep and also had provided an example on how to structure the code properly. Unfortunately I haven't be able to find much of this archived topic, so I was wondering whether someone had this _list() extention and place it in proper [ code ] block again for better readability again. Thanks
I don't have the original, but I'd imagine it would be something like this:
PHP Code: if ( ! function_exists('ul'))
I sit and wrote yesterday my extension on _list() function in order to do this.
I remember some parts of the script I was reffering to and tried to implement mine as this one, although I believe I have some changes and additions too. Anyway I have uploaded it on Github, the link is this one https://github.com/Lykos22/_list. Any thoughts or improvements are welcomed. P.S. to the CodeIgniter development team: Please consider adding this functionality to one of the upcoming versions of the framework (I mean not mine, probably you could do it in a more efficient way), I think it would be very useful to many. |
Welcome Guest, Not a member yet? Register Sign In |