Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

coldfusion 9 - Displaying different Headers & Footers for select pages

$
0
0

I have an application.cfc. page that will display a header and footer on each page that is produced and viewed what i you like to do is to show a different header and footer on select webpages on the same site.

Here's my code:

 

<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 of the Traveling Headpiece">

        <cfset request.filepath = "D:\home\travelingheadpiece.com\wwwroot\">

        <!---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>

 

 

 

 

 

In order to have different header/footer on select page will i have to create a different folder with another application.cfc like the one above. or could i incorporate an additional function name within the same application.cfc with the cfinclude pointing to another header/footer?

 

Any suggestion


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>