Same active ID's with lower level menu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pluck CMS |
Fix Committed
|
Low
|
Unassigned |
Bug Description
Since my navigation menu had to have 1 lower level, I added following code to theme.php:
<?php theme_menu('ul', 'li', 'active', 1); ?>
However, the lower level links are displayed when the parent page is active for which the parent receives the ID 'active'.
Identifiers should be unique and therefore this ID should occur only once within a page, but when a lower level menu item becomes 'active', it too has the same ID.
<ul><li id="active"><ul><li id="active"
I already "fixed" it by changing the following line within data/inc/
if ($level > $page_level && is_dir(
theme_
TO:
if ($level > $page_level && is_dir(
Which results in different "active" ID's for different levels.
<ul><li id="active"><ul><li id="active1"
After which I simply added #active1 to the style.css.
Another option would be to change the active ID to CLASS, but for some reason I went for this option.
Related branches
- Anders G. Jørgensen: Approve
-
Diff: 72 lines (+14/-10)3 files modifieddata/inc/editpage.php (+8/-7)
data/inc/functions.admin.php (+4/-1)
data/inc/functions.all.php (+2/-2)
Changed in pluck-cms: | |
status: | New → Confirmed |
Changed in pluck-cms: | |
importance: | Undecided → Low |
Fixed in lp:~uranium235/pluck-cms/pluck-cms