There's no simple way to do this (as far as I'm aware) in ColdFusion.

BlueDragon has a very useful function - Render() - which will parse  
the contents of a variable, exactly as you describe.

But on ColdFusion, I've always handled cases like this by having my  
templates as flat files to be included; the variables within them get  
processed as normal.


Seb

Seb Duggan
Web & ColdFusion Developer

e:      s...@sebduggan.com
t:      07786 333184
w:      http://sebduggan.com

On 27 Dec 2008, at 13:14, Maya MacDonald wrote:

> How can you display a variable within a variable?
>
> I have a client who needs to control the content of all email  
> notices that go out to their clients.
>
> Email notices have some dynamic content such as grabbing customer  
> name or account details. The value of the email notice content is  
> stored in a variable called #emailContent# and I would like it to  
> have a value of something like this (where it contains varibles  
> within itself):
>
> "Dear #customer#,
>
> Email content email content...your account expires on #expiryDate#."
>
> However, when the variable #emailContent# is outputted within a  
> CFMAIL tag the variables #customer# and #expiryDate# just get shown  
> as is with the hash marks. How can I output the variables within the  
> variable?
>
> Thanks!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317148
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to