Is it possible to include some theme functions so its possible to override the markup? Otherwise its divitis and no way of changing it for simpler css driven menus.

Comments

danielhonrade’s picture

"divitis", nice...

There are so many use cases, so what part or output you want to change, just in the dropdown menu divs?

daniel

tanc’s picture

Basically any time HTML is output this should be a theme function so themes or modules can override with a preprocess function. Ideally there would be a tpl.php file to copy into a theme and modify too. Thanks!

danielhonrade’s picture

ok, got that nice feature to add more flexibility for themers, so as I see it, it means I got to do something like 14 template files:

4 structure types:
1) dropdown - om-maximenu-submenu.tpl.php
2) accordion - om-maximenu-accordion.tpl.php
3) roundabout - om-maximenu-roundabout.tpl.php
4) tabbed - om-maximenu-tabbed.tpl.php

Each with different kinds of block containers, such as om-maximenu-submenu-links.tpl.php, om-maximenu-submenu-content.tpl.php, plus as om-maximenu-wrapper.tpl.php and as om-maximenu-content.tpl.php

Plus, dynamic templates like om-maximenu-submenu--[menu name].tpl.php

Not really hard to do, probably on next release it's done.

andjules’s picture

Perhaps a simpler approach would be to make each skin coupled to markup (tpl), not just CSS.
You've developed a bubble skin and a simple skin (and 'no skin)... There'd be default (no-skin) markup - 'simple' could use this - but obviously your bubble skin would require it's own template for all the rounded-corner divs.

Grateful for the module, and especially your eagerness to keep it maintained. Thank you.

danielhonrade’s picture

Status: Active » Closed (fixed)

fixed on latest version 1.35

andjules’s picture

Status: Closed (fixed) » Active

Looking at 1.35, it looks like you've implemented templates for each of the 'tabbed' style options. I don't know about the OP, but I'm not using tabbed menus, just a 'normal' megamenu (a few top level items, that - on hover - show a div/submenu full of content). My concern for simpler markup is below each of my main nav items, I see om-maximenu-content, and within that, om-maximenu-top, -middle, -middle-left, -middle-right, -bottom, -arrow, -open. That's a lot of nested wrapping DIVs, when personally, the top one (-content) would suffice for me. I can see how people wanting rounded corners or other (style-based) effects might want the freedom to template their own complex markup...but I'd suggest the default markup should be MUCH simpler.

danielhonrade’s picture

I can add these:
- om-maximenu-submenu-content--no-style.tpl.php - very simple
- om-maximenu-submenu-content--simple.tpl.php - simpler than bubble
- om-maximenu-submenu-content--bubble.tpl.php - lots of nested divs for rounded corners

danielhonrade’s picture

By default, I cannot change it to a simpler structure for the dropdown, since I have this default skins on admin settings.

It's easy to make it simple by copying these templates to your theme:

om-maximenu-submenu-content.tpl.php
om-maximenu-submenu-content--no-style.tpl.php

I just added these on dev, please download and test the dev version again, don't forget to clear cache.

danielhonrade’s picture

Status: Active » Closed (fixed)

added on latest version 1.36