![]() |
|
where can I edit / add ID's to the genrated menu lists? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: where can I edit / add ID's to the genrated menu lists? (/thread-5842.html) |
where can I edit / add ID's to the genrated menu lists? - simon - 2009-09-13 Hi, I need to assign id's to the [list] tags that are created on the fly when ZP generates the menu lists in order to get a bit of jquery working. Can anyone tell me where they are? I specifically need to edit the News, Albums and Pages opening [/list] [list]. Anyone help me out here? Be appreciated! Thanks, Simon[/list] where can I edit / add ID's to the genrated menu lists? - sbillard - 2009-09-13 If by IDs you mean the database ID field, then it is generated automatically. If you need something else, you will need to be more specific. where can I edit / add ID's to the genrated menu lists? - simon - 2009-09-14 Thanks for the reply, allow me to clarify, and sorry for the confusion: I want to assign a CSS ID to the opening `<ul>` of the html lists that are created when the navigation menus are generated. Example: `<ul id="my_id">` By Default they do not have id's assigned. I specifically need to assign id's to the News, Albums, Pages and Archive menus opening `<ul>` so that I can control their behavior. I am assuming I can edit this directly in one of the .php files, I am hoping someone can tell me where to look. Hope this is a but clearer? Thanks in advance, Simon where can I edit / add ID's to the genrated menu lists? - sbillard - 2009-09-15 Please review the functions guide. Generally speaking each of these functions which output HTML will allow you to pass an ID as an optional parameter. where can I edit / add ID's to the genrated menu lists? - simon - 2009-09-15 Thanks for the pointers! Got it. All good. S where can I edit / add ID's to the genrated menu lists? - acrylian - 2009-09-15 It is also possible to put something like `...` around all those list and address them by `#menu ul`, `#menu ul li` etc., in case all should look the same. where can I edit / add ID's to the genrated menu lists? - simon - 2009-09-15 Yes, true, that could have been a solution but i'm pretty sure it wouldn't validate. But I discovered that the empty value in the passed parameters of the function was the ID, which was exactly what i needed! Example: `<?php printAllNewsCategories("All news",TRUE,"expandNews","menu-active");` will output an unordered list with the following opening tag `<ul id="expandNews" class="menu-active">` (which in my case allows me to apply a bit of jquery that writes a class to the specified `<ul>` contextually, according to what ID I have specified, which sets my menu to expand or not). where can I edit / add ID's to the genrated menu lists? - acrylian - 2009-09-15 Yes, we added these parameters for that purpose..;-) Also if you need a full customized function you can also use the "get" variants that nearly every "print" function has to build yourown. Regarding validation, my suggestion should validate as well as `<ul>` is actually allowed witin `<div>`. where can I edit / add ID's to the genrated menu lists? - simon - 2009-09-15 Sure ul is allowed in div! But not vice versa (actually it might be allowed i would have to check to be certain i might have to eat my words..) but either way, in the context i am using it, it would be semantically incorrect - I'm building a set of nested menus that slide open and closed.
where can I edit / add ID's to the genrated menu lists? - acrylian - 2009-09-16 `div` is also allowed within `li` but that would require customized functions anyway. And of course I don't know what you doing, so if it works for you everything is fine..;-) |