ColdFusion evaluates variables in the actual file, it has no means to
evaluate variables stored in strings even if they appear as #variablename#
your best bet is to make your own pseudo variable system with a simple
replace statement like this:

replaceNoCase( string, "##urltoken##", urltoken, "all" )

I hope that helps,

Jordan Clark

----- Original Message -----
From: "Toby Tremayne" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Thursday, March 22, 2001 8:05 PM
Subject: RE: embedding a variable name


> mmm let me try and elaborate a little:
>
> whats happening is this:  a link (or multiple links) can get embedded
inside
> the message body text.  At the time I embed that href, I need to add to
it's
> query string a CALL to a variable.  I don't want it translated IN the
> message, I want it to translate it when it later displays the message to
the
> browser.
>
> IE if I have:
>
> <cfset urltoken = "cfid:2&cftoken:900785">
>
> I want to embed this:
>
> #urltoken#
>
> in the message text, so that when the browser displays the message later
on,
> it shows:
>
> cfid:2&cftoken:900785
>
>
> make sense?
>
>
> Toby Tremayne
> Code Poet and Zen Master of the Heavy Sleep
> Show Ads Interactive
> 359 Plummer St
> Port Melbourne
> VIC 3207
> P +61 3 9245 1247
> F +61 3 9646 9814
> ICQ UIN  13107913
>
> -----Original Message-----
> From: Marsh, Jeffrey B [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 23 March 2001 2:54 PM
> To: Fusebox
> Subject: RE: embedding a variable name
>
>
> This is way simplistic and I must be missing something here, but have you
> tried
> <cfoutput><a
> href="#self#?fuseaction=lib.selection&poem_id=914&#urltoken#"></cfoutput>
>
> ---
> Jeffrey B. Marsh
> Professionals built the Titanic.
> Amateurs built the Ark.
>
> -----Original Message-----
> From: Toby Tremayne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 7:38 PM
> To: Fusebox
> Subject: embedding a variable name
>
> I'm sure someone must have tried this before me - I can't figure out a way
> to do it.
>
> I have a facility on my forum which allows people to select a poem from
the
> library, and insert a link to it into the message text.  So when someone
> reads the message, they can click on the link and be taken directly to
that
> poem's page.
>
> The problem with this is that obviously all links need to have urltoken
> appended to them.  However I can't find a way to insert the variable name
> into the url that gets saved in the message text, then get CF to actually
> EVALUATE it when the message is read.
>
> This is what the links look like when they get embedded:
>
> <a href="#self#?fuseaction=lib.selection&poem_id=914&#urltoken#">
>
> obviously I'm escaping the hashes - so it saves exactly the above text
into
> the database.  But when I display it is displays exactly like that too -
> keeping the hashes in the url, so the link is treated as an anchor!!!
>
> I need it to read these variables when the message is displayed becsause
> obviously the variable values wil change from person to person.
>
> Any ideas?
>
>
> Toby Tremayne
> Code Poet and Zen Master of the Heavy Sleep
> Show Ads Interactive
> 359 Plummer St
> Port Melbourne
> VIC 3207
> P +61 3 9245 1247
> F +61 3 9646 9814
> ICQ UIN  13107913
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to