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
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
Seb,
Thank you for the reply.
I am not quite sure I am following how I would include this as a flat file?
Thanks,
Devin
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free
Maya,
When you're setting up your initial variable, can't you do something
like cfset variables.emailMessage = Dear variables.customerName
chr(10) chr(13) Message here /
- then you're combining the variables before you use them...
David
2008/12/27 Maya MacDonald devinpar...@hotmail.com:
Does evaluate do the trick?
cfmail...#Evaluate(emailContent)#/cfmail
Dominic
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
On another note - I have done something similar for a client where
they could setup various email templates. What I did was to give them
a set of keys they could use in their email body that would be
replaced with the relevent data. The options I gave them were like:
[title],
[firstname],
Thanks Dominic I'll give that a try!
~|
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:
Either:
1. Have a separate file with just the content of the email, including
the variables you want replaced, and include it in your cfmail like
this:
cfmail ...
cfinclude template=myemailtemplate.cfm /
/cfmail
or:
2. If your template text is in a database, you could generate a temp
I'll meet your captcha and raise you a CFFormProtect:
http://cfformprotect.riaforge.org/
Yes, this is far better than using CAPTCHAs. It's accessible and
usable, and will get you the same (or better) results.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software
So, for production, I should be able to leave trusted cache on while
turning off save class files. Are there any potential problems with
that? (other than the page loads slowing down on server restarts)
No, that's perfectly ok, and optimal in many cases.
Dave Watts, CTO, Fig Leaf Software
No.. These are actual people. The site they were advertising and
spamming is low budget enough not to use bots. I also have a logic
Captcha, so I can attest it's a human.
Just someone willingly spamming. :)
Is blocking links an option? Link spam isn't worth much without links.
Dave Watts,
This is more of a general question. I'm trying to figure out the best way to go
about implementing something.
My client wants to expand our sports clothing website to more than one
sport/website.
So for example, www.xsports.com would house:
www.xsportsvolleyball.com
www.xsportsbaseball.com
cfquery datasource=#CloudDatasource# name=Permissions
select *
from Permissions
order by UserID
/cfquery
cfoutput query=Permissions
cfloop index=Index list=#Permissions.columnlist#
cfif Permissions[Index][currentrow] EQ 1
You are looping over the column names of the query so that your if
statement, cfif Permissions[Index][currentrow] EQ 1, will be
evaluated for each column. This means that
Permissions.Accounting[currentRow] will be compared to the number 1.
If it is not a number, the comparison will throw a wobbly.
The value is 1. It's not Null.
I tried putting a val around it and it still bombs out.
I can't see where my logic is wrong.
Dominic Watson wrote:
If Accounting should be a number but can be null in the database, you
may want to use cfif Val(Permission[Index][currentrow]) EQ 1.
Otherwise I
The value is 1. It's not Null.
I tried putting a val around it and it still bombs out.
Did you try dumping the values?
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Hi guys, I've just installed CF8 on my Vista 64 bit, and, as most of you know,
it doesn't go very well.
I have googled for a solution but I just cant get it right.
So what I need is a step-by-step instruction on how to make it work.
Thanks in advance,
resident moron...
/mix
Strange..
When I cfdump var=#Permissions# I get a 0.
When I cfdump var=#Permissions.Recordcount# I get 45 (The correct
recordcount).
But when I changed the Permissions query to Settings, it worked...
Weird. Thanks for the tip. :)
Will Tomlinson wrote:
The value is 1. It's not Null.
I tried
Assuming your email message is _not_ in the database, just use
cfsavecontent and appropriately nested cfoutput.
cfsavecontent variable=emailContent
cfoutput
pDear #customer#:/p
pPay your $(*ing bill already./p
/cfoutput
/cfsavecontent
What I did for RIAForge is simply sniff the CGI variable hostname
I believe. Maybe server_name. Either way, when you go to
x.riaforge.org, and it isn't www.riaforge.org, we treat it as a
project home page. I convert from x to a real project primary key
value, and from there it is a trivial
What I did for RIAForge is simply sniff the CGI variable hostname
I believe. Maybe server_name. Either way, when you go to
x.riaforge.org, and it isn't www.riaforge.org, we treat it as a
project home page. I convert from x to a real project primary key
value, and from there it is a
Happy Holidays to all,
I'm looking for script that makes it possible to move items between
two multiple select boxes. Similar with the CrossSelect tag, But I
need the query for the first select to be driven by another select.
Something like the bind feature in CF8 where the first select will
Hopefully somebody can make sense of my explanation
Not sure I am following you... Anyway, this may be worth a look:
http://www.massimocorner.com/libraries/spry/linkedselect/
http://www.massimocorner.com/libraries/spry/linkedselect/sample_api.htm
This is an automatically generated message.
Thank you for contacting Global Reach Internet Productions. I will be out of
the office until Friday, January 2nd. I will respond to your message when I
return. However, if you need immediate assistance, either e-mail
supp...@globalreach.com or phone
24 matches
Mail list logo