for custom tags, I use
<cfset customtagsdir = "customtags/">
in the top-level fbx_settings
and then invoke it where needed as
<cfmodule template="#fusebox.rootpath##customtagsdir#mycustomtag.cfm">
this will work from anywhere within the actual fusebox app. If your path is
to somewhere else then you will have to adjust (and it may not be pretty).
If it is outside the app, up a level, then you *could* define it as
<cfset customtagsdir = "../customtags/">
but you know what? I've gotten out of the habit of throwing custom tags in
the generic Cfusion/CustomTags path. that works great on one server but
when I move my app I want to (a) be able to move the whole app without
thinking "uh, did I forget a custom tag that I need?" and (b) don't want to
worry that a updated version of a custom tag will not be
backwardly-compatible and therefore "break" my app. To heck with it. All
that I waste is a few extra bytes of extra disk space, one of the cheapest
commodities on the market.
here's another point to keep in mind : fusebox.rootpath always results in
either a empty string "" or it results in a relative path that ends with a
slash. Ditto with fusebox.currentpath. if you cant get things to work,
then try just outputting the value of these variables just before your call
to your custom tag and ensure that they are what you THINK they should be.
----- Original Message -----
From: "Toby Tremayne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 9:36 PM
Subject: Blocks directory and fusebox.rootpath
Hi all,
wrestling with fusebox.rootpath again. I'm setting up
openforums to work with this variable, but I've run into yet
another snag.
I have several files in the /blocks directory, and obviously
enough they're used as include. The thing is, because they're
included they take on the rootpath of the circuit they're
being included from, and means fusebox.rootpath doesn't work
for includes / cfmodules within the block file.
for instance, dsp_message, a re-useable block to display a
single message in a thread, calls a couple of custom tags. I
tried
template="#fusebox.rootpath#customtags/translateQuotes.cfm"
and it died, because it's being included from the home circuit
and there is nothing in the fusebox.rootpath variable. Yet
the cfmodule call is obviously treating the current path as
being the blocks directory, so the correct path would be:
template="../customtags/translateQuotes.cfm"
How on earth do I get this towork properly? Am I missing
something?
cheers,
Toby
----------------------------------------------------------------------------
--------
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
==^================================================================