> Enter the use of <CFInclude>. I was able to successfully load pages > placed in second-level subfolders (Subfolders place directly under the root > folder) without any trouble once the syntax was adjusted. For example > <CFInclude template="../menu.cfm"> or <CFInclude template="../footer.cfm>. > This syntax caused the pages placed in the level II Subfolders to load > without any problem but when I tried to access pages placed in third-level > subfolders (http://www.website.com/folder1/folder2" I received a 500 > Internal Server Error. Since we have a conference coming up next week I > wrestled the content in the level II folders to the level 1 subfolders so > everything worked correctly so the site would be live in time for the > conference.
The syntax you're using is relative syntax, and should work if you have a correct relative relationship. For example, if your root directory is c:\website, and you create a page in that directory that should include files in c:\website\folder1\folder2, you'd use this: <cfinclude template="folder1/folder2/includeme.cfm"> If you want to traverse up levels - for example, if you create a page in c:\website\folder1\folder2 and you want it to include files in c:\website, you'd use double dots: <cfinclude template="../../includeme.cfm"> Now, I'm not entirely sure from your question where both the file doing the include and the target of that include happen to be located. Also, you might find it useful to see the exact error message. It sounds like your browser is showing you just the HTTP status code. If you're using IE, uncheck "Friendly HTTP Errors" or whatever that option is called to see the real error message, or use a different browser. > Server-Side Include has a nice feature that the includes can be > found and loaded on to pages served from any folder regardless of how deep > they are from the Web root. All site pages contain <!--#include > virtual="/menu.shtml" -->which adds the site's navigation menu to all pages > no matter in what folders they reside in the directory tree. > > My question then is how can I make CF behave the same way so the > includes will be added to served pages no matter how deep they are stored > from the root folder. If such a feature has yet to be added to CF I'll cast > a vote for its inclusion in CF10. Otherwise is there a different syntax I > should use to cause Cf to locate includes on pages located in all folders > in the site's directory tree? Your assistance with this will be welcome. All > the best. You can use absolute paths, which do exactly this. To use an absolute path, you need a mapping within CF Administrator that points to the appropriate directory. For example, if you have a directory at c:\website, and you want to include files from that directory within files in c:\website\folder1 and c:\website\folder1\folder2, you could create a mapping that points to that directory, then use that: <cfinclude template="/website/includeme.cfm"> Also, when you install CF, it creates a mapping to the root directory of the website - if you set CF up to use IIS during the initial install, for example, it will point to the IIS web root directory. If you set CF to use its own internal web server, it'll point to that instead. If you'd set it up to use IIS, and IIS was in turn configured to use c:\website, you could include files from that directory from any file on the server using this: <cfinclude template="/includeme.cfm"> Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, onlin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345702 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

