I'd go with the second option except that you don't need the conditional
layout there, just set a flag of some type and then let the layout file
itself handle the additional layout.

example: the layout file itself might have

<cfparam name="showLogin" default="false" type="boolean">
<cfif showLogin>
    <cfinclude template="dspShowLogin.cfm">
</cfif>

 in an appropriate spot
and then Fusedoc it as a dependent file



----- Original Message -----
From: "John Beynon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 14, 2002 12:34 PM
Subject: RE: Newbie Q: Layouts and display files


> let me check that i'm understanding you correctly...
>
> do you mean that one section of the site home page you want to display
this
> login cell? But on any other page you don't want to display the login
cell?
>
> 2 ways to accomplish this i think:
>
> You're gonna need some conditional logic calling the login fuseaction as a
> CFMODULE...you know what fuseaction the home page is don't you? So why not
> use something like:
>
> <cfif attributes.fuseaction is "home.startpage">
>     <cfmodule template="#fusebox.rootpath##self#"
> fuseaction="login.showlogin">
> <cfelse>
>       ...
> </cfif>
>
> in the cell in question. You'd need to supress the layout for the
> login.showlogin fuseaction else you'll end up with layouts within layouts.
>
> *OR*
>
> You could move the conditional logic into the fbx_layouts file, and have
two
> seperate layout files, one with the login and one without, something like:
>
> <cfif Fusebox.isCustomTag or attributes.suppressLayout>
>     <cfset Fusebox.layoutDir="">
>     <cfset Fusebox.layoutFile="lay_clean.cfm">
> <cfelse attributes.fuseaction is "home.startpage">
>     <cfset Fusebox.layoutDir="">
>     <cfset Fusebox.layoutFile="lay_typical_with_login.cfm">
> <cfelse>
>     <cfset Fusebox.layoutDir="">
>     <cfset Fusebox.layoutFile="lay_typical.cfm">
> </cfif>
>
> does this help? hopefully it'll set you off in the right direction - if
not
> just post back.
>
> If it was me, i'd be more inclined to go with the first option......
>
> john.
>
> -----Original Message-----
> From: David Grabbe [mailto:[EMAIL PROTECTED]]
> Sent: 14 April 2002 16:37
> To: [EMAIL PROTECTED]
> Subject: Newbie Q: Layouts and display files
>
>
> Hello all,
>
> I'm BEGINNING to understand the basics of FB (3), but am stuck on the
right
> "fusebox approach" to handle a situation.
>
> The website I am working on has a central template which will be the basis
> of every page.  When the site first comes up, it will display this
template,
> and in one section (table cell) will be an area for a current user to
enter
> his/her username and PW.  But this is the only time this dsp file should
be
> displayed.  So how do you define and manipulate which dsp files are
included
> at different times?  All the examples I have seen either have a basic
> template with dynamic content added via #Fusebox.layout#?  Also, how are
> layout files and display files related?
>
> TIA,
> David
>
> _____________________________________________________________________
> This message has been checked for all known viruses by UUNET delivered
> through the MessageLabs Virus Control Centre. For further information
visit
> http://www.uk.uu.net/products/security/virus/
> <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