XH 1.6.4: Expandible Submenu
XH 1.6.4: Expandible Submenu
Christoph M. Becker – Plugins for CMSimple_XH
-
- Posts: 68
- Joined: Fri Apr 16, 2010 4:19 pm
- Location: Germany/Franconia
Re: XH 1.6.4: Expandible Submenu
I think, this would be a nice feature
leberecht.net | keep it simple, or fail
Re: XH 1.6.4: Expandible Submenu
I think that it is good idea to make the submenu collapsible, but it might be best to allow the user/template designer to choose what they prefer. An optional boolean paramter to submenu() would solve that fine; a config option would be also an option, but I prefer the former. However, that raises the question what should be the default. The traditional submenu for "backward compatibility"?cmb wrote:What do you think?
Anyhow, I don't like the solution posted by Tata. If CSS is not available, there are two links which don't do anything useful. Either we find a pure CSS solution as progressive enhancement, or we should do it with JavaScript.
Christoph M. Becker – Plugins for CMSimple_XH
Re: XH 1.6.4: Expandible Submenu
I think it's the job of the template designer and not of the core.
A template can provide all kind of menus and submenus, and if java script is required for any menu it should go into the template and not into the core.
Already with CMSimple_SE all kinds of fascinating java script menus were bundled.
Maybe I don't quite understand the point, but to me the request for a expandible submenu rather seems like a request of template designer who are having difficulties to program such a menu in a template. We could e.g. bundle a simple template with such a menu to the standard download, so that template designers could copy it or learn how to do it.
Adding code to a template enables unusual menus, e.g. like the right aligned drop down menu in Yogaschool.
A template can provide all kind of menus and submenus, and if java script is required for any menu it should go into the template and not into the core.
Already with CMSimple_SE all kinds of fascinating java script menus were bundled.
Maybe I don't quite understand the point, but to me the request for a expandible submenu rather seems like a request of template designer who are having difficulties to program such a menu in a template. We could e.g. bundle a simple template with such a menu to the standard download, so that template designers could copy it or learn how to do it.
Adding code to a template enables unusual menus, e.g. like the right aligned drop down menu in Yogaschool.
Re: XH 1.6.4: Expandible Submenu
Somehow you're right, but what about existing templates? These will probably never get updated. Maybe a small add-on would be an even better solution?svasti wrote:I think it's the job of the template designer and not of the core.
Christoph M. Becker – Plugins for CMSimple_XH
Re: XH 1.6.4: Expandible Submenu
http://paulrhayes.com/2009-06/accordion-using-only-css/cmb wrote:Either we find a pure CSS solution
Re: XH 1.6.4: Expandible Submenu
Interesting, thanks. However, an accordion would be overkill here, because the submenu has only one section; it might be a nice alternative for Expandcontract or similar solutions. One caveat: the presented solution does not work on IE 9 and older, where the sections can't be expanded at all.meltemi wrote:http://paulrhayes.com/2009-06/accordion-using-only-css/cmb wrote:Either we find a pure CSS solution
Christoph M. Becker – Plugins for CMSimple_XH
Re: XH 1.6.4: Expandible Submenu
So what should we vote about? Tatas solution is pure CSS now as far as I can see. Therefore it's a template issue. Put a nice example into one of the standard templates and that's it.
Re: XH 1.6.4: Expandible Submenu
Yes, it is controlled by (thanks to who else than Christoph ):manu wrote:So what should we vote about? Tatas solution is pure CSS now as far as I can see. Therefore it's a template issue. Put a nice example into one of the standard templates and that's it.
Code: Select all
/* SUBMENU */
.submenu{ margin-top: 1rem;}
.submenu ul {display:none;}
.submenu:hover ul {display:block;}
/* h4 has to be changed if menu_levels != 3 */
.submenu h4{font-size: 1rem; color: #008e00; text-stadow: none; font-weight: bold;}
.submenu h4:after {content: "(+)"}
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: XH 1.6.4: Expandible Submenu
Tata, maybe you like to update your structure1_black template with such an expandible submenu? This way we don't have to change the "template tag" submenu(), but others could easily take the CSS and improve their templates. It seems to me that would be the best solution.
Christoph M. Becker – Plugins for CMSimple_XH