Link to home
Start Free TrialLog in
Avatar of swaggrK
swaggrK

asked on

Coldfusion cfsavecontent

I am using a cfsavecontent tag to write the results from a database to a index.cfm page. The problem I am experiencing is that the cfsavecontent hard-codes the cfincludes as well. This is a problem because some of the cfincludes  will change over time.
I am not sure if there is a coldfusion or javascript way of simply ensuring that
<cfinclude template="/advert/rt_300x250.cfm">
remains within the code not the contents of the rt_300x250.cfm.

Here is a short example

<cfsavecontent variable="cachedOutput">

<cfinclude template="/advert/rt_300x250.cfm">
</cfsavecontent>


<cffile action="write"
file="#hardNewPathUrlDestintation#\index.cfm"
output="#cachedOutput#">

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swaggrK
swaggrK

ASKER

That worked. Great! Thanks!