Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi Level Menus Feature Developement
#1
One glaring flaw in gs is the lack of multi menu systems and template functions.

fortunately mvlcek's wonderful i18n plugin has done a great job of fulfilling this need.

To add this functionality to core I need to gather input on functionality it is expected to have and development suggestions.

There are a few things we know and have been discussed here
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/276

Ideas, concepts ?

Discuss.

navigation should be in 2 distinct parts.

The basics
backend organization
Back end can set multiple menus and hierarchies, allow mix in urls.

Front end theme functions
Front end should be able to pull navigation from a specific menu, or a query or filter. Get pages in heirarchy by menu id, or get pages by date range, or other flag, then format as a GS menu. These should be 2 seperate things, data can be fetched and used by template raw, or fetched with default menu html.

oh and menus will be cached and fast.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#2
Here is a concept of what I imagine it might be like that I whipped up

File selection will be problematic, for small site s a page combo would be fine, for large sites an autocomplete input or multiple selection popup filebrowser might be better. Problem is how do you organize large sites when there is no menu hierarchy yet. it would be one large list of pages. We almost have to have categories or internal hierarchy just for organizing pages, or tags or something just to be able to manage the pages list. Perhaps this is better left to a plugin to provide a custom file selector with a;pha or tag searching and filtering sorting capabilities.


Attached Files Thumbnail(s)
   
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
A modal instead of dropdown/popup maybe?

Yes, it could be left to a plugin anyway (as before 3.1).
Reply
#4
I don't mean the whole thing just the filebrowser. ( that is what the selector link is for )
Most installs can probably just make use of a combo box or listbox if <30 pages

A modal filebrowser could do sorting by pub or modified date, and group by alpha perhaps, I think we would need this anyway for link insertion in cke. A better "page" browser
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
I don`t know, but ist could be helpful. Lepton CMS and WebsiteBaker asre using the module Show_menu2. Ok, both of these CMS are using a Mysql-Database, but why don`t have a look into the Source-Code. You can have with it that, what you have shown in your Screenshot.

http://www.lepton-cms.com/sm2/
http://www.lepton-cms.com/sm2/enterprise.php

I don`t know, if there is a way, to realize it without a Database, but perhaps a kook could be helpful.

Peter
Reply
#6
i'm used to getting an array back automatically based on a few params and building template with smarty for menus...

so i'd be happy with something like this for now.. the functionality itself is priority, fancy ui can come later imho

get_nestednav($start,$depth,$add,$hide,$sort,$current,$echo)
$start = slug to indicate what level of menu to start at (default site root)
$current = slug of current page so extra css (e.g. class="active" etc) can be added to its item
$depth = how many levels deep? (default 0 no child pages, only siblings)
$add = comma separated list of slugs to add (default '')
$hide = comma separated list of slugs to omit (default '')
$sort = maybe.. can just use order in backend menu thing**
$echo = default TRUE echo the html back, FALSE = returned instead

** and instead of a separate UI, can't we just order them on the pages tab? with a sidebar item to add an a different content type, i.e. external link, to the tree there?
Reply
#7
I need input on behavior of multi level menus, this was not an issue in the past, but is with nested menus.

When you have children in a menu, but their parents not, where do I put the children in the output?
Do I put them is the closest parent, or put them in root level ?

I explain it better here
https://github.com/GetSimpleCMS/GetSimpl...t-89797910

I coded it to do both, and it probably not a huge deal since in 3.4 you can then manipulate the menu however you want it, but when in legacy mode or importing 3.3x menu structure how should I handle it ?

I think i18n just hides all children of non menu parents unless you are specifically calling that slug as parent ?

Not sure we want to do that though, or offer options somehow. Of course i can just ditch the legacy mode, and force you to create a menu manually or else nested menu requests are ignored.

Personally, I prefer parent and order sorting sometimes, it makes menu manipulation while editing easier for small sites, of course it gets out of hand fast. I would like to keep it.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#8
(2015-04-09, 09:58:10)shawn_a Wrote: When you have children in a menu, but their parents not, where do I put the children in the output?
Do I put them is the closest parent, or put them in root level ?

imho, that is severe edge case i wouldn't worry about. if someone is doing wonky stuff like that with their navigation, they should know where they want to link to that 'orphan' page and how to do it.. and it would have to already be in place for a visitor to even get to that page in the first place.

just keep them out of the menu. it wouldn't go in a different parent (could be completely unrelated content) and wouldn't belong at the root level, either. a param to optionally insert an orphan at the end of the menu perhaps, but that's as far as i would go.
Reply
#9
It's probably fairly common as we are going from a flat to nested menu.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#10
(2015-04-11, 11:44:06)shawn_a Wrote: It's probably fairly common as we are going from a flat to nested menu.

use a different call for the new nested menu, leave the old one in place that builds the old 'flat' menu... then people can upgrade their site to the new menu at their leisure. deprecate it (the 'old' way) prior to 4.0 release, and remove it for 4.0, leaving only nested menu.
Reply
#11
Yeah but this is available to themes sooo it has to be backwards compatible so users do not need to change stuff and so they can continue to use old parent order menus if they want to.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#12
i have installed the 3.4 alpha today for some tests.
it is really good, so far no bugs found.
but the thing i really miss is the nested menu thing by default... in know you have this already on screen, just wanted to say it...

keep up the good work!
Reply
#13
What do you mean bu default?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#14
i mean, is it possible that you can add the multi-level navigation by default without that its needed to add a plugin for it?

edit: as i can read in the opener-thread your already thinking about it, i just wanted to underline it.
Reply




Users browsing this thread: 1 Guest(s)