Skip to main content
Inspiring
March 6, 2013
Question

Application.cfc tags exclusions of certain pages

  • March 6, 2013
  • 1 reply
  • 532 views

I have the application.cfc page. The only take that are in the file is the code that make cf show the header and footer on all pages. There are a few pages that I would not like the header and footer displayed I.e. a coming soon page. ID there a way to insert a rule into the application.cfc to not allow the "comingsoon.cfm" page to display header and footer?

Here the code I used inside the application.cfc page.

<cfcomponent output="false">

<cfset this.datasource="store1975"><!---

<cffunction name="OnRequestStart" returntype="boolean" output="true">

          <!---Any variable set here can be used by all out pages--->

        <cfset request.company = "Sisterhood">

        <!---Display Header on every Page--->

        <cfinclude template="header.cfm">

        <cfreturn true>

     </cffunction>

   

         <cffunction name="OnRequestEnd" returntype="boolean" output="true">

        <!---Display Footer on every Page--->

        <cfinclude template="footer.cfm">

        <cfreturn true>

     </cffunction>--->

</cfcomponent>

    This topic has been closed for replies.

    1 reply

    BreakawayPaul
    Inspiring
    March 6, 2013

    I do this in mine:

    <cfset request.pagename = CGI.SCRIPT_NAME>

    <cfif request.pagename neq "/pagepath/comingsoon.cfm"><cfinclude template="header.cfm"></cfif>