Skip to main content
Inspiring
July 20, 2006
Answered

how to detect the current page

  • July 20, 2006
  • 2 replies
  • 360 views
how can I write some cfif conditions to detect the current page?

<cfif ? IS page1.cfm>abc
<cfelseif ? IS page2.cfm>def
<cfelseif ? IS page3.cfm>ghi
<cfelse>jkl
</cfif>
    This topic has been closed for replies.
    Correct answer liquid_One
    Use the cgi variables.....
    Try using <cfdump var="#cgi#"> to see which ones are available.
    gl, Mike

    2 replies

    liquid_OneCorrect answer
    Inspiring
    July 20, 2006
    Use the cgi variables.....
    Try using <cfdump var="#cgi#"> to see which ones are available.
    gl, Mike
    Inspiring
    July 20, 2006
    cgi.scriptName most likely, other cgi variables maybe useful to you as well.

    jkgiven wrote:
    > how can I write some cfif conditions to detect the current page?
    >
    > <cfif ? IS page1.cfm>abc
    > <cfelseif ? IS page2.cfm>def
    > <cfelseif ? IS page3.cfm>ghi
    > <cfelse>jkl
    > </cfif>