Robert H. Nichols
Web Developer
INDUS, Inc.
919-316-4661
[EMAIL PROTECTED]
-----Original Message-----
From: Patrick McElhaney [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 11:39 AM
To: [EMAIL PROTECTED]
Subject: RE: How to turn off layout> Loryn wrote:
>
> I have an application with several circuits. In 3 of the circuits
> I want the parent layout to be applied.
<!--- parent fbx_layouts.cfm --->
<cfset fusebox.layoutDir = "">
<cfset fusebox.layoutFile = "parentLayout.cfm">
Not that that's any help. You already understood that much. ;-)
> In 2 of the circuits I DO NOT want the parent layout applied.
Well, we'll need to have a variable to decide whether to
include the parent's layout.
<!--- parent fbx_layouts.cfm --->
<cfset fusebox.layoutDir = "">
<cfif attributes.suppressLayout>
<cfset fusebox.layoutFile = "">
<cfelse>
<cfset fusebox.layoutFile = "parentLayout.cfm">
</cfif>And let's set that variable to false by default.
<!--- parent fbx_layouts.cfm --->
<cfset fusebox.layoutDir = ""><cfparam name="attributes.suppressLayout" default="FALSE">
<cfif attributes.suppressLayout>
<cfset fusebox.layoutFile = "">
<cfelse>
<cfset fusebox.layoutFile = "parentLayout.cfm">
</cfif>Now we just need to set it to false in the two children.
<!--- child circuit fbx_layouts.cfm ---><cfset attributes.suppressLayout = TRUE>
<cfset fusebox.layoutDir = "">
<cfset fusebox.layoutFile = "">
> I want different layouts applied within those circuits depending
> upon which fuseaction is being called.
There are a couple of ways to do that. I like to have the fuseaction
set a variable that the fbx_layouts file in the child will use to
determine which layout to use.<!--- child circuit fbx_switch.cfm --->...
<cfcase value="doSomething"><cfset attributes.displayMode = "fancy"><cfinclude template="dsp_somethinge.cfm"></cfcase><cfcase value="doSomethingElse"><cfset attributes.displayMode = "simple"><cfinclude template="dsp_somethinge.cfm"></cfcase>...<!--- child circuit fbx_layouts.cfm ---><cfset attributes.suppressLayout = TRUE>
<cfset fusebox.layoutDir = "">
<cfswitch case="#attributes.displayMode#"><cfcase value="fancy"><cfset fusebox.layoutFile = "fancyLayout.cfm"></cfcase><cfcase value="simple"><cfset fusebox.layoutFile = "simpleLayout.cfm"></cfcase>...<cfdefaultcase><cfset fusebox.layoutFile = ""></cfdefaultcase></cfswitch>Does that help at all?Patrick
==^================================================================ 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 ==^================================================================
