That would work just fine. Note that you don't need the "##" when assigning variables like that.
<cfset thepagevar = application.mystandardvar /> will do. On 11/21/11 1:15 PM, Robert Harrison wrote: > Ok. So if I want to create a global var that's almost always the same (with a > few exceptions), I could do the following in the application.cfc: > > Set up the application vars I always want available. > > <cffunction > name="OnApplicationStart"access="public"returntype="boolean" output="false" > hint="Fires when the application is first created."> > <cfset application.mystandardvar = "foo"> > <cfset application. myoverridevar = "kungfoo"> > </cffunction> > > Set up the most standard use like below (which should make it available on > all pages): > > <cffunction name="OnRequestStart" access="public" returntype="string" > output="true" hint="Fires at first part of page processing."> > <cfset thepagevar="#application.mystandardvar#"> > </cffunction> > > Then, on the exception pages where I want to use the other variant, I can do > the following at page top: > > <cfset thepagevar="="#application.myoverridevar#"> > > > This will make all occurrences of "thepagevar" the same as > application.mystandardvar, except on those pages where I did the additional > cfset at page top, in which case it will be application. Myoverridevar for > that page only. > > Does this look correct? > > Thanks > > Robert B. Harrison > Director of Interactive Services > Austin& Williams > 125 Kennedy Drive, Suite 100 > Hauppauge NY 11788 > P : 631.231.6600 Ext. 119 > F : 631.434.7022 > http://www.austin-williams.com > > Great advertising can't be either/or. It must be&. > > Plug in to our blog: A&W Unplugged > http://www.austin-williams.com/unplugge > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348836 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

