Birgit,

John's suggestion is useful if you expect to use CFMODULE.  Because the
variable is in the request scope you would not have to pass it along to be
used CFMODULE , whereas if it is a locally scoped variable you'd have to use
some method to get it into the CFMODULE.   That doesn't mean you should
always use Request scope or that you should shy away from CFMODULE calls. It
just means using the right tool for the right job.

One of the benefits of FuseQ is that one is avoiding a lot more of the
instances where CFMODULE would previously have been employed. So you're
picking up the advantage of both sides. Obviously there are still some
places where CFMODULE will be appropriate.

I also like Roger B's solution, except for the choice of variable name. As
you know, "fusebox." is a reserved structure in the official FB3 spec. So I
would experimenting with Roger's technique and adopting it if it meets your
needs but not to use his naming convention since doing so would make your
app non-FB3-compliant (if that matters to you). Virtually anything else in
terms of naming would work as well (uh, how about "myFusebox." as a
structure name?) yet then your app would indeed meet FB3's small variable
naming compliancy footprint.



----- Original Message -----
From: "Birgit Pauli-Haack" <[EMAIL PROTECTED]>
To: "John Beynon" <[EMAIL PROTECTED]>
Sent: Saturday, May 18, 2002 5:21 PM
Subject: Re: Newbie Question


> John,
>
> I know this sounds pretty basic... but couldn't I just skip the request
scope with FB3?
>
> <cfset imagesdir = "#fusebox.rootpath#images/">
>
> <img src="#imagesdir#someimage.gif">
>
> the fbx_setting get also called in a cfmodule call and the variable
> would be available for a recursively called fuseaction, no?
>
> or am I missing something now?
>
>
>
> Birgit
>
>
> Saturday, May 18, 2002, 4:18:50 PM, you wrote:
>
> JB> sure thing Mike,
>
> JB> <cfset request.imagesdir = "#fusebox.rootpath#images/"> - sets the
images
> JB> folder off the application root.
>
> JB> then to display an image i use <img
src="#request.imagesdir#someimage.gif">
>
> JB> does that help?
>
> JB> johnb.
>
> JB> -----Original Message-----
> JB> From: Mike [mailto:[EMAIL PROTECTED]]
> JB> Sent: 18 May 2002 21:24
> JB> To: [EMAIL PROTECTED]
> JB> Subject: Re: Newbie Question
>
>
> JB> Thank you for all the support.
>
> JB> John I understand the principal of the webroot.  Could I see a piece
of code
> JB> that declares that in the FBX_settings.cfm and how your image link.
>
> JB> Thanks
>
> JB> Mike
>
> JB> ----- Original Message -----
> JB> From: John  <mailto:[EMAIL PROTECTED]> Beynon
> JB> To: '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'>
> JB> Sent: Saturday, May 18, 2002 3:47 PM
> JB> Subject: RE: Newbie Question
>
> JB> Hi mike and welcome to Fusebox.
>
> JB> For variables like webroot etc, i'd stick in the root fbx_settings of
the
> JB> application, this make them available to any child circuit in the
> JB> application. I usually create a variable for a image directory and
simply
> JB> refer to it using the variable name - so if i move the images i simply
> JB> modifiy the variable in the root fbx_settings. If you only need to
refer to
> JB> webroot in one circuit then you could just use the fbx_settings in
that
> JB> circuit.
>
> JB> As for self posting pages, you could argue that every page in a
fusebox app
> JB> is self posting since the entire application is handled by index.cfm
which
> JB> then passes the requested fuseaction to the specified
circuit/fuseaction.
> JB> most people set a variable called #self# in their root fbx_settings,
equal
> JB> to "index.cfm" so form posts usually looks like
>
> JB> <form action="#self#" method="post">
> JB>     <input type="hidden" name="fuseaction"
> JB> value="somecircuit.somefuseaction">
> JB>     ...
> JB> </form>
>
> JB> What kind of self posting where you thinking of? The same fuseaction
being
> JB> use to add/update/delete some record based a mode passed to the
fuseaction -
> JB> I think that would be perfectly ok.
>
> JB> This list is the fusebox list, and your questions are perfectly
welcome here
> JB> - no matter how "beginner" you feel they are
>
> JB> does this help?
>
> JB> johnb.
>
> JB> -----Original Message-----
> JB> From: Mike [mailto:[EMAIL PROTECTED]]
> JB> Sent: 18 May 2002 20:44
> JB> To: [EMAIL PROTECTED]
> JB> Subject: Newbie Question
>
>
> JB> Hello All,
>
> JB> I am very much a beginner with Fusebox.
>
> JB> I have two questions in Fusebox 3.0 where would I set up variables
like the
> JB> webroot and what is the recommended way to do that?
>
> JB> With fusebox is it recommended to use self posting form pages or not?
>
> JB> I know these questions are very basic and if they don't belong on this
could
> JB> someone direct me to a list for beginners.
>
> JB> Thanks in Advance.
>
> JB> Mike
>
> JB> _____________________________________________________________________
> JB> This message has been checked for all known viruses by UUNET delivered
> JB> through the MessageLabs Virus Control Centre. For further information
visit
> JB> http://www.uk.uu.net/products/security/virus/
> JB> <http://www.uk.uu.net/products/security/virus/>
>
>
>
> JB> _____________________________________________________________________
> JB> This message has been checked for all known viruses by UUNET delivered
> JB> through the MessageLabs Virus Control Centre. For further information
visit
> JB> http://www.uk.uu.net/products/security/virus/
>
>
>
> JB> _____________________________________________________________________
> JB> This message has been checked for all known viruses by UUNET delivered
> JB> through the MessageLabs Virus Control Centre. For further information
visit
> JB> http://www.uk.uu.net/products/security/virus/
> JB> <http://www.uk.uu.net/products/security/virus/>
>
>
>
>
> JB> _____________________________________________________________________
> JB> This message has been checked for all known viruses by UUNET delivered
> JB> through the MessageLabs Virus Control Centre. For further information
visit
> JB> http://www.uk.uu.net/products/security/virus/
>
>
>

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