Skip to main content
December 16, 2008
Question

Interpreting # in database URL variable

  • December 16, 2008
  • 1 reply
  • 235 views
I'd like to store URLs in my database for use by the menu system. Some of the URLs require query parameters sent, and I am storing the URL like this:

../auth/NOIApp.cfm?MgmtSysID=#URL.MgmtSysID#

I want to build an href tag from this, but Coldfusion is displaying the #URL.Mgmtsysid# parameter literally without interpreting it.

Is there a way to get Coldfusion to replace the #URL.MgmtSysID# with the value passed to the page?

Thanks!
John
This topic has been closed for replies.

1 reply

Inspiring
December 16, 2008
londonjw wrote:
> I'd like to store URLs in my database for use by the menu system. Some of the
> URLs require query parameters sent, and I am storing the URL like this:
> .../auth/NOIApp.cfm?MgmtSysID=#URL.MgmtSysID#
>
> I want to build an href tag from this, but Coldfusion is displaying the
> #URL.Mgmtsysid# parameter as is without interpreting it.
>
> Is there a way to get Coldfusion to replace the #URL.MgmtSysID# with the value
> passed to the page?
>
> Thanks!
> John
>

You can do this with a combination of the evaluate() and de()
[delay evaluate] functions.

<cfoutput>#evalutate(de(aQry.urlValue))#</cfoutput>

But this is not considered a good practice and has limitations and
possibly severe risks depending on how it is used.