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.
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.
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
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.
2015-04-02, 13:29:40 (This post was last modified: 2015-04-02, 13:31:35 by simplycrazy.)
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?
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 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.
(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.
(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.
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.
2018-08-11, 17:02:38 (This post was last modified: 2018-08-11, 17:03:01 by brainbob.)
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...