Hi Barney- I have found that sometimes if the file the core file is trying to include has an error in it, the core fusebox file will choke and not include the file. Do you have fusebox.suppresserrors set to false?
Joel -----Original Message----- From: Barney Boisvert [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 11:16 AM To: [EMAIL PROTECTED] Subject: fusebox.layoutDir I've been struggling trying to use fusebox.layoutDir, and I can't get it to work. I've got a site that will allow itself to be 'skinned', including some layout stuff (menu bar format, etc.). I've created a directory structure for the app as such: -------------------------------- +-root_circuit +-skins | +-skin_1 | | +-lay_default.cfm | | +-lay_print.cfm | | ... | +-skin_2 | +-lay_default.cfm | +-lay_print.cfm | ... +-nested_circuit_1 ... --------------------------------- Within root_circuit/fbx_Layouts.cfm I have two lines: ---------------------------------------------------------------------- <cfset fusebox.layoutDir = "skins/skin_1/"> <cfset fusebox.layoutFile = "lay_default.cfm"> ---------------------------------------------------------------------- This causes an error to be thrown in the core file, saying it can't find the specified layout file. I put in some debugging code to do some checking, and found that it is trying to include the right file, but can't for some reason. Here is my error checking code (starting at line 293 of fbx_fusebox30_CF45_nix.cfm): ---------------------------------------------------------------------- <!--- this behaves the same with expandPath("./") ---> <cfset dir = getdirectoryfrompath(getcurrenttemplatepath())> <!--- copied from the CFINCLUDE call ---> <cfset template = "#fusebox.thislayoutpath##fusebox.layoutdir##fusebox.layoutfile#"> <cfoutput> <pre>Local Dir : #dir# thislayoutpath : #fusebox.thislayoutpath# layoutdir : #fusebox.layoutdir# layoutfile : #fusebox.layoutfile# Template : #template# FS Path : #dir##template# Does File Exist : #fileExists(dir & template)#</pre> </cfoutput> ---------------------------------------------------------------------- The output is as follows (going to a root_circuit fuseaction): ---------------------------------------------------------------------- Local Dir : /tmp_web/pier/public_html/external/ thislayoutpath : layoutdir : skins/skin_1/ layoutfile : lay_default.cfm Template : skins/skin_1/lay_default.cfm FS Path : /tmp_web/pier/public_html/external/skins/skin_1/lay_default.cfm Does File Exist : YES ---------------------------------------------------------------------- This code is executing directly before the include on the 'template' variable, and the include fails. I'm running Linux, I tested to make sure that CF could read the file (it can), so that's not the problem. And as if that wasn't enough, if I copy the layout file to my local directory and change fusebox.layoutDir in my fbx_Layouts.cfm to "", then it works just fine. It has to be something to do with going into subdirectories, but I sure as heck can't figure out what the problem is. Here is the output for when it's going to a local lay_ file (same page request). ---------------------------------------------------------------------- Local Dir : /tmp_web/pier/public_html/external/ thislayoutpath : layoutdir : layoutfile : lay_default.cfm Template : lay_default.cfm FS Path : /tmp_web/pier/public_html/external/lay_default.cfm Does File Exist : YES ---------------------------------------------------------------------- Any help with this would be GREATLY appreciated. I don't mind beating my head against a wall to weasel out a solution, but I've been playing with this for hours, and my head is getting sore. much thanks, barneyb --- Barney Boisvert [EMAIL PROTECTED] 360-671-8708 (work) 503-267-2200 (cell) http://www.piersystem.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 5/21/2002 ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
