Just looking at the documentation for layouts and I see that you can
define your variables, but that that they need to be defined in each
controller to exist in the page. I was looking at the title var in
particular, and wondering how to access the site name that I set up in
the config file. I would much rather be able to access that via the
layout as opposed to needing to define it in each controller.
Maybe I am just missing it though, sorry for the newbie question.
Rob
http://cfwheels.org/docs/function/set
what i usually do for my sites is setup a container called myapp in
the global scope using set and put any application specific setting in
there so it doesn't collide with any wheels settings:
in config/settings
<cfset loc.myapp = {}>
<cfset loc.myapp.title = "this is my site">
<cfset set(myapp = loc.myapp)>
then to retrieve them, you use the get() method
http://cfwheels.org/docs/function/get
so within my view, controllers or models i do:
<cfset myapp = get("myapp")>
<cfoutput>#myapp.title#</cfoutput>
or if you prefer:
<cfoutput>#get("myapp").title#</cfoutput>
Thanks!
Rob
mike henke also asked a similar question. my response in this thread
http://groups.google.com/group/cfwheels/browse_thread/thread/644af7786038d95
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.