Nav Menu categories/folders

362 views
Skip to first unread message

Alex Manley

unread,
Jun 17, 2015, 10:28:54 AM6/17/15
to xata...@googlegroups.com
Hey All,

I have some tables that are related (Splitter, Ports, Connected Splitters) Splitters describe the device, Ports describe individual ports on that splitter, connected splitters tells which ports on the first level splitter go to the top of the second level splitter. All of that is pretty much useless for what I want to do, but I figured I'd give some background. All I want to do is lump those three tables into a drop down menu like the more drop down when you have more than 6 tables, is this possible? All my googling and research has led me to the categories of the page, like nav menu item, table_tabs, stuff like that. I have some ideas on how to do this with redirects but I want to know if there is a solution already in place for this.

TIA,
Alex

Steve Hannah

unread,
Jun 17, 2015, 12:08:21 PM6/17/15
to xata...@googlegroups.com
With the g2 theme, you can add arbitrary actions to the top left menu using the actions.ini file.  The category is "top_left_menu_bar"

So create the action that you want in the top left menu bar with category "top_left_menu_bar".  Use the "subcategory" directive on that action to define a category that will be used for the drop-down menu items.  Then add the links to the individual tables by using that "subcategory" as the category.

E.g.

[table_splitters_menu]
   category=top_left_menu_bar
   subcategory=table_splitters
   label="Splitters"

[table_splitters]
    url="{$site_href}?-table=Splitters"
    category=table_splitters

etc...

Steve

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
Visit this group at http://groups.google.com/group/xataface.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/f1112c89-2724-40b5-9c7a-99c27a13e99c%40googlegroups.com.



--
Steve Hannah
Web Lite Solutions Corp.

Alex Manley

unread,
Jun 17, 2015, 12:30:44 PM6/17/15
to xata...@googlegroups.com
Would this also then require me to remove the tables from the conf.ini [tables] directive?

Thanks,
Alex

Steve Hannah

unread,
Jun 17, 2015, 12:43:30 PM6/17/15
to xata...@googlegroups.com

Alex Manley

unread,
Jun 17, 2015, 1:18:54 PM6/17/15
to xata...@googlegroups.com
That worked flawlessly! I do have one last question is there any way to set a display order?

Steve Hannah

unread,
Jun 17, 2015, 1:27:03 PM6/17/15
to xata...@googlegroups.com
You can use the order directive.  The autogenerated _tables menu items are ordered starting at -1000 increasing from there.  If you play around with orders in that range you should be able to place it where you want.
This is the code that generates the default actions if you're curious how it works.

Steve

Alex Manley

unread,
Jun 17, 2015, 4:48:03 PM6/17/15
to xata...@googlegroups.com
Got some funky problems with ordering, if I set my menu to order = -1000 it is not the first option, I've changed it to be -1001 which seems to have fixed it, within the menu items themselves it works perfectly.
Reply all
Reply to author
Forward
0 new messages