Ticket #374 (closed defect: invalid)
Duplicate sub-menu IDs in accordian HTML
| Reported by: | andrej_pavlovic | Owned by: | tboutell |
|---|---|---|---|
| Priority: | major | Milestone: | 1.5 |
| Component: | apostrophePlugin | Version: | 1.5 |
| Keywords: | navigation | Cc: | |
| Symfony version: | 1.4 |
Description
In _accordion.php each <ul> is generated with this ID:
a-nav-<?php echo $name ?>-<?php echo $nest ?>
The problem is that if I have two sub-menus, both of them will have the same ID (since they would both have the same name and nest level).
As a result, the menu sort/draggable doesn't work correctly because it assumes that the ID is unique:
var nav = $("#a-nav-<?php echo $name ?>-<?php echo $nest ?>");
What I did to avoid this issue, is append a random number at the end of the id. Using the parent ID would also probably work, but I don't think that is currently passed into the template.

