Closed (fixed)
Project:
OM Maximenu
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2011 at 05:50 UTC
Updated:
6 Dec 2011 at 07:21 UTC
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
Comment #1
danielhonrade commented"divitis", nice...
There are so many use cases, so what part or output you want to change, just in the dropdown menu divs?
daniel
Comment #2
tancBasically 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!
Comment #3
danielhonrade commentedok, 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.
Comment #4
andjules commentedPerhaps 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.
Comment #5
danielhonrade commentedfixed on latest version 1.35
Comment #6
andjules commentedLooking 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.
Comment #7
danielhonrade commentedI 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
Comment #8
danielhonrade commentedBy 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.
Comment #9
danielhonrade commentedadded on latest version 1.36