RE: [coldbox:18226] [Coldbox 3.6.0] Question on getting data for none view related items in a layout.

The runEvent() approach solves this. Each event is self-sufficient to get what data it needs and return the HTML for the menu. Therefore, if a layout wants menu (or pod) A, run that event. If not, don’t run anything. You can nest menus or “pods” as deep as you want so the main layout has
#runEvent(“menu.main”)#

And the view that menu.main renders has:

  • #runEvent("menu.products")#
  • #runEvent("menu.services")#
  • #runEvent("menu.contactUs")#
  • #runEvent("menu.admin")#
  • #runEvent("menu.logout")#
  • #runEvent("menu.login")#

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com