Skip to main content
Inspiring
July 20, 2006
Answered

how to detect the current page

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 is closed to new replies. Start a new post to keep the conversation going.
    liquid_OneCorrect answer
    Inspiring
    July 20, 2006
    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
    Translate
    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>
    Translate