A more flexible menu system

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

A more flexible menu system

Post by cmb » Wed Feb 05, 2014 4:21 pm

Hello Community,

since a very long there are several alternative menu add-ons (xtoc, xtoc28, Advanced TOC, DHTML menu etc.) out there, which offer additional features over the built-in toc() and li() functions. That's basically very nice, but has the drawback that these solutions can't cater for new functionality, and so they would have to be updated every time a new feature related to the TOC is introduced to a new CMSimple(_XH) version.

In CMSimple_XH 1.5.4 the possibility to add a callback parameter to use an individual li() function was added to toc(). That was a first step to make the menu system more flexible, but obviously that's not sufficient.

So I propose that we add even more flexibility to the menu system, either by adding further callbacks, or by rewriting toc() and li() in an object oriented way applying the template method pattern. At least some rewrite seems reasonable, because the code is somewhat unwieldy at present.

Any ideas, suggestions, comments?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: A more flexible menu system

Post by bca » Thu Feb 06, 2014 6:31 pm

I'd vote for a better menu system. An easy way to have either vertical or horizontal or both and to style them easily would be great.
B

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

Re: A more flexible menu system

Post by cmb » Thu Feb 06, 2014 7:08 pm

bca wrote:An easy way to have either vertical or horizontal or both and to style them easily would be great.
Well, the HTML is the same whether the menu should be horizontal or vertical -- the rest is up to CSS, anyway. I have some doubts that generating this CSS should be built-in to CMSimple_XH; a comprehensive tutorial on styling menus for CMSimple_XH seems to be more appropriate[1], and there are plenty of resources on the web on general styling of menus (some might even work out of the box with CMSimple_XH's menu markup).

PS: [1] http://www.cmsimple-xh.org/wiki/doku.php/toc roughly explains the basics.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply