Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
I do this in mine:
<cfset request.pagename = CGI.SCRIPT_NAME>
<cfif request.pagename neq "/pagepath/comingsoon.cfm"><cfinclude template="header.cfm"></cfif>