...">

Is ColdFusion the equivalent of PHP for include_once?

I am adding this to my pages:

pagewithinclude.cfm

<cfinclude template = "_pagename.cfm"> 

_pagename.cfm

 <cfif Not IsDefined("variables.included_pagename")> <cfparam name = "variables.included_pagename" default = "1"> rest of page </cfif> 

Is there a better way in CF? Something similar to PHP include_once?

+6
coldfusion include
source share
1 answer

No, what you did is probably the best way to do this. Although I would use the Request variable instead.

+5
source share

All Articles