CFINCLUDE relative pathway workaround
1) To my knowledge, CF requires a relative pathway for CFINCLUDE pathways.
2) I have a widely used page footer, that exists on all my pages.
3) I have a wide variety of subdirectories for my pages.
4) aside from the ../../../../../.. method, I have found myself nesting CFINCLUDE, with the respective template in each folder, with CFINCLUDE TEMPLATE=../name.cfml referencing the parent folder, and then that template referencing its parent folder, etc. like this:
Root folder: (Template name is PageFooter.cfml and contains the actual footer code)
SHRUBS all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
EVERGREENS all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
NEEDLE all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
LEAF all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
FLOWERS all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
PERENNIALS all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
ANNUALS all pages in this folder contain:
<CFINCLUDE TEMPLATE="../PageFooter.cfml"> with PageFooter.cfml containing:
<CFINCLUDE TEMPLATE="../PageFooter.cfml">
Now I've heard about using application.cfml to accomplish this task with less agony, by using CFSET somehow, and the use of one template in each folder called global.cfml and that global.cfml references the application.cfml using this CFSET I think.
Pleae help.
