You need to add the filename of the page you're adding to the PageInclude column of the database table (dbo.ProductPages), and a then pass the pageID code of the new item to index.cfm (index.cfm?p=[PageID]). On second glance, it looks like you may have already done this part--your message says it cannot find /products/bf.cfm. Maybe the file you created needs to be in a different location in the file system? You'll also probably want to wash the URL param p before passing it into your database, using cfqueryparam, otherwise you subject yourself to SQL injection attacks.
<cfquery name="GetPageContent" datasource="web"> SELECT * FROM dbo.ProductPages WHERE PageID = <cfqueryparam cfsqltype="cf_sql_integer" value="#url.p#"> </cfquery> On Thu, Feb 19, 2009 at 3:22 PM, Scott Weber <[email protected]> wrote: > > First, I have no clue about CF. We had a developer make a site in CF and > now he is gone. I'm simply trying to add a new page to the existing site > and it does not work. > > Here is the response that I get: > Could not find the included template /products/bf.cfm. > Note: If you wish to use an absolute template path (for example, > template="/mypath/index.cfm") with CFINCLUDE, you must create a mapping for > the path using the ColdFusion Administrator. Or, you can use per-application > settings to specify mappings specific to this application by specifying a > mappings struct to THIS.mappings in Application.cfc. > Using relative paths (for example, template="index.cfm" or > template="../index.cfm") does not require the creation of any special > mappings. It is therefore recommended that you use relative paths with > CFINCLUDE whenever possible. > > The error occurred in D:\inetpub\wwwroot\server.com\products\index.cfm: > line 101 > > 101 : <td colspan="3" rowspan="6" valign="top" > bgcolor="#5E5E5E"><cfinclude template="#GetPageContent.PageInclude#"></td> > > If I look at the template #GetPageContent.PageInclude# it goes to this: > <cfquery name="GetPageContent" datasource="web"> > SELECT * > FROM dbo.ProductPages > WHERE PageID = '#URL.p#' > </cfquery> > which is at the top of the index.cfm file. > > All other pages that were made this way work, except any new ones I create. > I have to be missing something that is not making this work.. > > Any ideas on where I can start looking? > > thanks > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319553 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

