To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #374 (closed defect: invalid)

Opened 21 months ago

Last modified 13 months ago

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.

Change History

Changed 21 months ago by andrej_pavlovic

  • version set to trunk

Changed 17 months ago by tboutell

  • owner changed from boutell to tboutell

Changed 13 months ago by johnnyoffline

  • status changed from new to closed
  • resolution set to invalid

If you specify different names for the menus, you have different IDs.

<?php include_component('aNavigation', 'accordion', array('name' => 'sub-menu-1' ... parameters ...)) ?>

<?php include_component('aNavigation', 'accordion', array('name' => 'sub-menu-2' ... parameters ...)) ?>

Changed 13 months ago by johnnyoffline

  • keywords navigation added
  • version changed from trunk to 1.5
  • milestone set to 1.5
Note: See TracTickets for help on using tickets.