Toby: comments follow:
> yeah i've played about with the vars and the problem is > they're wrong hehe. Fusebox.rootpath is pretty useless to me > in general so far... For the cfmodules I've added a variable > request.blocksPathToRoot which fixes it up. that's funny, the more I use fusebox.rootpath the more useful it becomes. I personally am very much against the idea of blocks of code sitting around in different areas that can only be gotten to via use of dot-dot-slash. That is what made FB2 useless in a corporate setting. If it's in a different dir, then it's a different kind of "object" and therefore should be accessed the same way as any other different object would be : via cfmodule or the other solution (come to CF-North for more details on that). besides, what is request.blocksPathToRoot except a variant on fusebox.circuitpath? the only difference is that you don't seem to want to call the blocks directory a "circuit" > a) I've had to remove references to fusebox.rootpath in all > links etc in any circuit other than the home circuit. All > exits now point simply to #self#. It works, but seems > strange. to me this sounds like a non-sequitur. I've never had any gross interaction between a reference to #self# versus a reference to fusebox.rootpath. I use the former as many other people do -- at run-time to choose amoung various exit fuseaction candidates, or during page generation to momentarily CFMODULE elsewhere. I use the latter to refer to inline resources which the *HTML* in the page needs after CF is done with it so that the end-user's browsers can correctly render the page. > b) I've had to use a cfset request.queryPath in the > fbx_settings of every sub-circuit, instead of cfparam, because > I need this: > #fusebox.rootpath#queries hmm, again I'm not quite sure why this is presenting a problem for you. are you putting all your queries into one big dir off of the main circuit? if so, then what you're looking for is a quasi-absolute path (well absolute insofar as it references from the root of the application). FOr this, one uses fusebox.rootpath. in this case, you'd likely find useful something like cfset querydir = "queries/" as well Or, are you referencing your queries from a "query" sub-dir off of every circuit in the app. If so, then the trick is not to use fusebox.rootpath but rahter just the simpel #querydir# mentioned above. does that make any sense? again, i find fusebox.rootpath and fusebox.circuitpath (and fusebox.currentpath) terribly useful because what I end up with is a self-contained app that can be very easily moved and very easily understood 6 months later. No dependencies on CF mapping, or the "official" custom tags directory on the server, or etc. You wanna see my app work on my laptop? sure thing! i just copy and paste the entire directory off of my web root where it lives and bingo! it works outta the box, because all the references therein are self-contained. Thursday, April 04, 2002, 1:13:51 PM, you wrote: JQv> for custom tags, I use JQv> <cfset customtagsdir = "customtags/"> JQv> in the top-level fbx_settings JQv> and then invoke it where needed as JQv> <cfmodule template="#fusebox.rootpath##customtagsdir#mycustomtag.cfm"> JQv> this will work from anywhere within the actual fusebox app. If your path is JQv> to somewhere else then you will have to adjust (and it may not be pretty). JQv> If it is outside the app, up a level, then you *could* define it as JQv> <cfset customtagsdir = "../customtags/"> JQv> but you know what? I've gotten out of the habit of throwing custom tags in JQv> the generic Cfusion/CustomTags path. that works great on one server but JQv> when I move my app I want to (a) be able to move the whole app without JQv> thinking "uh, did I forget a custom tag that I need?" and (b) don't want to JQv> worry that a updated version of a custom tag will not be JQv> backwardly-compatible and therefore "break" my app. To heck with it. All JQv> that I waste is a few extra bytes of extra disk space, one of the cheapest JQv> commodities on the market. JQv> here's another point to keep in mind : fusebox.rootpath always results in JQv> either a empty string "" or it results in a relative path that ends with a JQv> slash. Ditto with fusebox.currentpath. if you cant get things to work, JQv> then try just outputting the value of these variables just before your call JQv> to your custom tag and ensure that they are what you THINK they should be. JQv> ----- Original Message ----- JQv> From: "Toby Tremayne" <[EMAIL PROTECTED]> JQv> To: <[EMAIL PROTECTED]> JQv> Sent: Wednesday, April 03, 2002 9:36 PM JQv> Subject: Blocks directory and fusebox.rootpath JQv> Hi all, JQv> wrestling with fusebox.rootpath again. I'm setting up JQv> openforums to work with this variable, but I've run into yet JQv> another snag. JQv> I have several files in the /blocks directory, and obviously JQv> enough they're used as include. The thing is, because they're JQv> included they take on the rootpath of the circuit they're JQv> being included from, and means fusebox.rootpath doesn't work JQv> for includes / cfmodules within the block file. JQv> for instance, dsp_message, a re-useable block to display a JQv> single message in a thread, calls a couple of custom tags. I JQv> tried JQv> template="#fusebox.rootpath#customtags/translateQuotes.cfm" JQv> and it died, because it's being included from the home circuit JQv> and there is nothing in the fusebox.rootpath variable. Yet JQv> the cfmodule call is obviously treating the current path as JQv> being the blocks directory, so the correct path would be: JQv> template="../customtags/translateQuotes.cfm" JQv> How on earth do I get this towork properly? Am I missing JQv> something? JQv> cheers, JQv> Toby JQv> ----------------------------------------------------------------------- ----- JQv> -------- JQv> Life is Poetry, write it in your own words JQv> ----------------------------------------------------------------------- ----- JQv> -------- JQv> Toby Tremayne JQv> Senior Technical Consultant JQv> Code Poet and Zen Master of the Heavy Sleep JQv> Lyricist Software JQv> www.lyricist.com.au JQv> m: +61 416 048 090 JQv> icq: 13107913 ---------------------------------------------------------------------------- -------- Life is Poetry, write it in your own words ---------------------------------------------------------------------------- -------- Toby Tremayne Senior Technical Consultant Code Poet and Zen Master of the Heavy Sleep Lyricist Software www.lyricist.com.au m: +61 416 048 090 icq: 13107913 ==^================================================================ 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 ==^================================================================
