Title: dynamically calling eventname
Thread: dynamically calling eventname
Forum: Need Help?
Conference: ColdBox
User: tonyg
Hello,
If you change the EventName in your configuration from "event" to
something else (like "page" or "action") on an existing app, is there a way to
avoid having to manually change all of the links and such in my views?
For
example, in Model-Glue, you can do:
[code]viewState.getValue('myself')[/code]
which will return "index.cfm?event="
and will take into account what the
event name is in your configuration.
So you can do:
[code]
<cfset myself
= viewState.getValue('myself') />
<cfoutput><a href="#myself#myevent">My
Link</a>
[/code]
And not have to worry about what the actual event name is
configured as.
See this blog post:
http://www.markdrew.co.uk/blog/index.cfm/2007/8/17/Model-Glue-Tips-Part-7-Set-my
self-in-your-views
Is there anything like that in Coldbox? I looked through
the docs and couldn't find anything.
thanks,
Tony