CLASS attribute on <li/> using HTML Helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: CLASS attribute on <li/> using HTML Helper (/showthread.php?tid=62714) |
CLASS attribute on <li/> using HTML Helper - Lykos22 - 08-18-2015 Hi all, I had found the old topic http://forum.codeigniter.com/archive/index.php?thread-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 RE: CLASS attribute on <li/> using HTML Helper - mwhitney - 08-18-2015 I don't have the original, but I'd imagine it would be something like this: PHP Code: if ( ! function_exists('ul')) RE: CLASS attribute on <li/> using HTML Helper - Lykos22 - 08-19-2015 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. |