1 Reply Latest reply on Dec 16, 2008 9:16 AM by Newsgroup_User

    Interpreting # in database URL variable

    londonjw
      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
        • 1. Re: Interpreting # in database URL variable
          Level 7
          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.