ColdBox Framework Forums Notification: Post to How should I handle a top menu bar?

Title: How should I handle a top menu bar?
Thread: How should I handle a top menu bar?
Forum: Discussions
Conference: ColdBox
User: djsoren What Coldbox feature should I use to include a tabbed menu at the top of every
page? (A good example is this website's own top menu)

By default I would like
to have all "display events" show the correct tabbed menu. Logged in
administrators will be able to see a couple additional tabbed links. The current
tab should be indicated with an HTML ID. (Like #currenttab)

It doesn't seem
right to include the menu in the layout since there are some dynamic tabs.
However, if I move it elsewhere I would have to call it every time I need it.
(which is most of the time)

Should it be rendered with a plugin? Should it be
a separate view that's included? Other ideas?

Thanks for any input,
Dan
http://forums.coldboxframework.com/index.cfm?event=ehMessages.dspMessages&threadid=A10B7F1E-FF65-CEF6-65E92E6F5CD78F53

  • Use a tags/menus directory like Luis said;
  • Call render view method in your layout.main.cfm to render the menu;
  • In your view, use sth like <cfif Event.getValue(“menu.isAdminActive”,false)>My Admin Tab

Ernst

If you want to activated the admin tab, set Event.setValue(“menu.isAdminActive”,true) in your handler.