XH 1.6.4: Expandible Submenu

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

XH 1.6.4: Expandible Submenu

Post by cmb » Sun Jun 22, 2014 4:41 pm

Hello Community,

Tata has suggested to make the submenu expandible.

What do you think?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

designfjord
Posts: 68
Joined: Fri Apr 16, 2010 4:19 pm
Location: Germany/Franconia

Re: XH 1.6.4: Expandible Submenu

Post by designfjord » Sun Jun 22, 2014 8:01 pm

I think, this would be a nice feature
leberecht.net | keep it simple, or fail

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by cmb » Wed Dec 10, 2014 4:19 pm

cmb wrote:What do you think?
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"?

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

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.6.4: Expandible Submenu

Post by svasti » Wed Dec 10, 2014 5:15 pm

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.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by cmb » Wed Dec 10, 2014 6:14 pm

svasti wrote:I think it's the job of the template designer and not of the core.
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?
Christoph M. Becker – Plugins for CMSimple_XH

meltemi
Posts: 177
Joined: Sat Feb 22, 2014 10:11 pm
Location: Franken (Deutschland)
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by meltemi » Thu Dec 11, 2014 9:21 pm

cmb wrote:Either we find a pure CSS solution
http://paulrhayes.com/2009-06/accordion-using-only-css/

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by cmb » Thu Dec 11, 2014 9:41 pm

meltemi wrote:
cmb wrote:Either we find a pure CSS solution
http://paulrhayes.com/2009-06/accordion-using-only-css/
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.
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by manu » Mon Dec 15, 2014 9:50 am

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.

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by Tata » Mon Dec 15, 2014 12:55 pm

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.
Yes, it is controlled by (thanks to who else than Christoph :-)):

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.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.4: Expandible Submenu

Post by cmb » Wed Dec 17, 2014 11:19 pm

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

Post Reply