Hi all,
I venture to time in the area with cold box. However, I do myself as extremely difficult to understand the logic behind
Until now I have navigation elements built with the help of . In “cold box” that works on the basis of events. Is my assumption correct that I must prepare for each menu item an event?
The following navigation example cfparam:
Home -> index.cfm
Test -> cmd = test index.cfm?
Show index
Show testcontent
But now the whole of my vision with coldbox
Home -> index.cfm
Test -> test event = index.cfm?
<cfset event.setView(“Samples/index”)>
</ cffunction>
Can someone help me as a boost if this is the right way or have I misunderstood the whole?
LG and thank you for the hint,
Andy
Are you trying to show/hide navigation elements depending upon the “page” the user is viewing? If not, would you mind telling us what you want to do without using code?
Jason Durham
I want to display dynamic content, depending on the selected menu item.
Layouts/layout.main.cfm
#getResource(“changelanguage”)#
<option value="de_DE" selected="selected">Deutsch)
<option value="en_US" selected="selected">English
<option value="es_SV" selected="selected">Spanish
handlers/general.cfc
<cfset setfwLocale(event.getValue(“locale”))>
<cfset setNextevent(‘samples’)>
If I do it as described above, it works. Now, my question was, do I need to create an event for each item?
I’m still having a hard time following. Each URI can fire 0, 1 or many events. The choice is yours. Check out one of the sample apps.
Jason Durham