Download & Extend

HTML Generation: ONE root <ul> with hierarchical children rather than current MULTIPLE <ul> roots.

Project:Dynamic Persistent Menu
Version:7.x-2.0-alpha2
Component:Code
Category:feature request
Priority:major
Assigned:Unassigned
Status:active

Issue Summary

+ I like that your module works both with and without Javascript.
- What I like less, is the HTML list structure it generates.

The way i.e. Superfish and also most other websites (regardless which CMS backend) implement hierarchical menus: One root list with hierarchical children. That is <ul> with <li> children, which are again a parent to an <ul> if they contain subitems, and so on. You on the contrary create one root <div> and every child is a <ul>, which then again has the <li> ... <ul> ... <li> children.

In other words: Instead of creating one tree with all its multiple branches, you create multiple trees with again their multiple branches.

If you view a Dynamic Persistent Menu enabled site through the text browser Lynx, the structural disadvantage gets obvious immediately. Text browsers, web search bots can still find and follow all the menu links, but their hierarchical (and hence semantical) meaning is lost! This may be a SEO disadvantage.

I hence propose to you that you change to the ONE tree MULTIPLE branches HTML approach.

See the illustrations below and note, that I am using Special Menu Items, which allows placeholder (= non clickable) and separator menu items. In my example those placeholders are denoted by using quotes arround them.

HIERARCHICAL HTML LIST STRUCTURE
as generated by i.e. Superfish

- Animals
-- "Land:"
-- Mouse
-- Cat
-- "Sea:"
-- Dolphin
- Clowns
-- Jon
-- Mark
- Contact
-- "All possible ways of contact to our company."

FLAT HTML LIST STRUCTURE
as generated by Dynamic Persistent Menu

- Animals
- Clowns
- Contact

- "Land:"
- Mouse
- Cat
- "Sea:"
- Dolphin

- Jon
- Mark

- "All possible ways of contact to our company."

Comments

#1

On 28.10.2010 maintainer yrocq replied to me via email:

I agree that this structure would be more logical. I am currently fighting with a strange menu trail bug in the version 1, but I hope I'll soon be able to work again on the version 2 and integrate the changes that you propose.

#2

Version:6.x-2.0-alpha2» 6.x-2.0-alpha3

I test-used 6.x-2.0-alpha3, but sadly it still renders in the "multiple UL root" manner.
When do you plan to change this?

#3

The purpose of the 6.x-2.0-alpha3 was to fix another bug. I have little time to work on this module, so I can't predict precisely when this feature will be implemented.

#4

Ok! And just to clarify: I was just inquiring.

Open source coding, such as Drupal module contribution, is volunteer work!

Nobody expects it from you! If a feature request is implemented, fine, if not, it's to be accepted, or to be done oneself! ;-)

#5

Is this fixed meanwhile?

#6

Version:6.x-2.0-alpha3» 7.x-2.0-alpha2

Will be fixed in 7.x-2.x branch, and then possibly backported.

#7

Appreciated!

#8

One problem is that most sites that use this module expect child trees to appear below the main tree. Achieving this with the desired structure would require relatively complex css within the module. One possibility would be to allow users to select, in the admin page, how the tree is structured, with the default being the current configuration (separate trees).

nobody click here