Dude,
Just set the variable name into an application-level variable:
cfset APPLICATION.Constants.DepartmentName = epidemiology and
biostatistics /
. Then use
cfset page_location = APPLICATION.Constants.DepartmentName
Or something to that effect. No need to keep it in a file.
Not sure about your reasons, but you can do:
cfsavecontent variable=myText
cfinclude...
/cfsavecontent
Adrian
-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: 05 September 2006 15:43
To: CF-Talk
Subject: including into a cfset
okay, I'm sure this is
I would just go back to bed. :)
Just kidding...
I'm not quite sure why you don't just set that string in a variable and
simply output the variable as opposed to including an entire file just
for three words.
The proper syntax for what you had would be:
cfset page_location = cfinclude
]
615.370.1530 x737
--//-
-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 05, 2006 9:47 AM
To: CF-Talk
Subject: RE: including into a cfset
Dude,
Just set the variable name into an application-level variable:
cfset
..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 05, 2006 10:43 AM
To: CF-Talk
Subject: including into a cfset
okay, I'm sure this is cause I'm just not thinking right
cfsavcontent var=myvarcfinclude template=mytemplate.cfm
//cfsavecontent
cfoutput#myvar#/cfoutput
..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 05, 2006 10:43 AM
To:
erm, maybe i've not understood, but if you set a variable in your
include then it will exist after the include?
Testinclude.cfm
cfoutput#isdefined(page_location)#/cfoutput
cfinclude template=department_name.cfm
cfoutput#isdefined(page_location)#/cfoutput
This worked great.
The main reason is that I wanted it to work with something that already exists.
I am putting up a placeholder site and using components from another
site/application. All this will be redone in a few months and it will be it's
own application then.
cfsavecontent
8 matches
Mail list logo