Hi John,

to answer your comments;

the problem with the blocks files is that they're being included by
files in the home circuit as well, so the cfmodule calls (that are in
the blocks file) don't work.

I am actually using a query path var similar to what you mentioned -
the issue with fusebox.rootpath is that I set the variable in
fbx_settings.  This means fusebox.rootpath is only ever "" because the
fbx_Settings in the home circuit overrides the rest (if you're using
cfparams)

As for the display files in other circuits having to point to self -
basically if I put fusebox.rootpath in they all died.  Took it out and
left just #self# in there, and all was fine.

My biggest problem - and here it may be just the difference between
what I expect fusebox.rootpath to do and what it actually does - is
that for a lot of bits and pieces, it would be more useful to me if it
were correct for each file within sub-circuits.  Maybe I'm being
incredibly thick but it doesn't do things the way I expect it to.

Toby



Thursday, April 04, 2002, 4:00:57 PM, you wrote:

JQv> Toby:

JQv> 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.


JQv> that's funny, the more I use fusebox.rootpath the more useful it becomes. I
JQv> personally am very much against the idea of blocks of code sitting around in
JQv> different areas that can only be gotten to via use of dot-dot-slash. That is
JQv> what made FB2 useless in a corporate setting. If it's in a different dir,
JQv> then it's a different kind of "object" and therefore should be accessed the
JQv> same way as any other different object would be : via cfmodule or the other
JQv> solution (come to CF-North for more details on that).

JQv> besides, what is request.blocksPathToRoot except a variant on
JQv> fusebox.circuitpath? the only difference is that you don't seem to want to
JQv> 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.

JQv> to me this sounds like a non-sequitur. I've never had any gross interaction
JQv> between a reference to #self# versus a reference to fusebox.rootpath.  I use
JQv> the former as many other people do -- at run-time to choose amoung various
JQv> exit fuseaction candidates, or during page generation to momentarily
JQv> CFMODULE elsewhere. I use the latter to refer to inline resources which the
JQv> *HTML* in the page needs after CF is done with it so that the end-user's
JQv> 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


JQv> hmm, again I'm not quite sure why this is presenting a problem for you. are
JQv> you putting all your queries into one big dir off of the main circuit? if
JQv> so, then what you're looking for is a quasi-absolute path (well absolute
JQv> insofar as it references from the root of the application). FOr this, one
JQv> uses fusebox.rootpath.  in this case, you'd likely find useful something
JQv> like
JQv> cfset querydir = "queries/" as well

JQv> Or, are you referencing your queries from a "query" sub-dir off of every
JQv> circuit in the app. If so, then the trick is not to use fusebox.rootpath but
JQv> rahter just the simpel #querydir# mentioned above.

JQv> does that make any sense?

JQv> again, i find fusebox.rootpath and fusebox.circuitpath (and
JQv> fusebox.currentpath) terribly useful because what I end up with is a
JQv> self-contained app that can be very easily moved and very easily understood
JQv> 6 months later. No dependencies on CF mapping, or the "official" custom tags
JQv> directory on the server, or etc.  You wanna see my app work on my laptop?
JQv> sure thing! i just copy and paste the entire directory off of my web root
JQv> where it lives and bingo! it works outta the box, because all the references
JQv> therein are self-contained.


JQv> 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
JQv> path is
JQv>> to somewhere else then you will have to adjust (and it may not be
JQv> 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
JQv> in
JQv>> the generic Cfusion/CustomTags path.  that works great on one server
JQv> 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
JQv> 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.
JQv> All
JQv>> that I waste is a few extra bytes of extra disk space, one of the
JQv> cheapest
JQv>> commodities on the market.

JQv>> here's another point to keep in mind :  fusebox.rootpath always results
JQv> in
JQv>> either a empty string "" or it results in a relative path that ends
JQv> with a
JQv>> slash.  Ditto with fusebox.currentpath.   if you cant get things to
JQv> work,
JQv>> then try just outputting the value of these variables just before your
JQv> call
JQv>> to your custom tag and ensure that they are what you THINK they should
JQv> 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>> --------

JQv>> Life is Poetry, write it in your own words

JQv>> -----------------------------------------------------------------------
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







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
==^================================================================

Reply via email to