Link to home
Start Free TrialLog in
Avatar of Shawn
ShawnFlag for Canada

asked on

include template with link

I'm trying to clear the cache in an admin area via a link on a page. My link right now is
<cfoutput><a href="members/act_clearcached.cfm">Clear Cache</a></cfoutput>

I don't really wqant to go to the page. I want it to include the template act_clearcached.cfm when it reloads.

what is missing here?
Avatar of _agx_
_agx_
Flag of United States of America image

Assuming the template generates no output, cfinclude it:

<cfinclude template="act_clearcached.cfm">  
Correction:

<cfinclude template="members/act_clearcached.cfm">
Avatar of Shawn

ASKER

but I want it to happen only when the link is clicked on. Would it be something like

<cfoutput><a href="<cfinclude template="members/act_clearcached.cfm"> ">Clear Cache</a></cfoutput>

act_clearcached.cfm does have a little output. see below
act_clearcached.cfm
<cfobjectcache action="clear">
<br>
<br>
<br>
 
<div align="center"><strong>All cached objects should now be cleared.</strong></div>

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 Shawn

ASKER

tried solution 2 and works like a charm

thanks agx