0 Replies Latest reply on May 12, 2014 3:04 PM by College Kid

    coldfusion 9 - Displaying different Headers & Footers for select pages

    College Kid Level 1

      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 name="OnRequestEnd" returntype="boolean" output="true">

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

              <cfinclude template="footer.cfm">

              <cfreturn true>








      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