• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Interpreting # in database URL variable

Guest
Dec 16, 2008 Dec 16, 2008

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

197

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2008 Dec 16, 2008

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation