well a long way to do it is to retrieve the template from the database -save to a tmp file and then use cfmodule to execute.
e From: [EMAIL PROTECTED] (Michael Dinowitz) Reply-To: [EMAIL PROTECTED] To: CF-Talk <[EMAIL PROTECTED]> Subject: Re: templates held in database Date: Sun, 23 Jun 2002 23:51:30 -0400 You can do it with functions and variables, but not with CF tags. > Hi > > My question. Is it possible to store the contents of a CF template in a SQL7 > table, insert that into another template with a query and for it to work? If > it does, are there any restictions. > > Thanks for any simple answers > Mike > ---------------------------------------------------- > NZERN National Office > Mail: PO Box 9000, Christchurch > (03) 338-5451 > E-mail: [EMAIL PROTECTED] > http://www.bush.org.nz > ---------------------------------------------------- > > Example > ----------------------------------- > page.cfm > > <!--- Search Engine ---> > <CFQUERY name="Template" datasource="DataSQL" dbtype="ODBC"> > SELECT Template > FROM tblTemplate > WHERE (NavItemID = #NavItemID#) > </CFQUERY> > > <!DOCTYPE html public "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML> > <HEAD> > <TITLE>[NZERN] #Navitem#</TITLE> > </HEAD> > <BODY bgcolor="#FFFFFF"> > > <!--TOP PANEL--> > > <CFINCLUDE template="_top.cfm"> > <TABLE width="600" border="0" cellpadding="0" cellspacing="0" > bgcolor="99CC99"> > <TR> > <TD valign="top"> > <CFOUTPUT query="Template">#Template#</CFOUTPUT> > </TD> > </TR> > </TABLE><!--FOOTER--> > <CFINCLUDE template="_footer.cfm"> > </BODY> > </HTML> > -------------------- > Contents of #Template# when NavItemID=15 > > <CFQUERY name="NZ_Nursery" datasource="DataSQL" dbtype="ODBC"> > SELECT > NursID, > NursTitle > FROM tblNursery > ORDER BY NursTitle > </CFQUERY> > <!--- ---> > <CFOUTPUT><TABLE width="430" border="0" cellpadding="0" cellspacing="0" > bgcolor="##FFFFFF"> > <TR> > <TD valign="top"> > <P align="center"> <BR><FONT face="Verdana" size="4"><B>Native Plant > Nurseries A to Z</P> > <HR> > <P></B></FONT> > <TD> > <TR> > <TD> > <TABLE width="428" border="0" cellpadding="0" cellspacing="0" > bgcolor="##FFFFFF"> > <TR> > <TD> > > <FONT face="Arial narrow"> > <CFLoop query="NZ_Nursery"> > <A href="http://www.bush.org.nz/nursery/#NursID#.html" > target="_top">#NursTitle#</A><BR> > </CFLoop> > </FONT> > > </TD> > </TR> > </TABLE> > </TD> > </TR> > </TABLE> > </CFOUTPUT> > ---------------------------------- > > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

