In all my circuits I include switch/case logic.  I
 
 
 
 
 
<cfswitch expression="#attributes.Layout#">
 
    <cfcase value="default">
        <cfset fusebox.layoutFile = "lay_Blank.cfm">
        <cfset fusebox.layoutDir = "themes/default/">
    </cfcase>
 
    <cfcase value="print">
        <cfset fusebox.layoutFile = "lay_Blank.cfm">
        <cfset fusebox.layoutDir = "themes/print/">
    </cfcase>
 
    <cfcase value="none,no,off">
        <cfset fusebox.layoutFile = "lay_Blank.cfm">
        <cfset fusebox.layoutDir = "themes/">   
    </cfcase>
   
    <cfdefaultcase>
        <cfset fusebox.layoutFile = "lay_Blank.cfm">
        <cfset fusebox.layoutDir = "themes/">
    </cfdefaultcase>
 
</cfswitch>
 
 
Then I can set the way I want the circuit to be displayed either in the switch or threw the url or module.  For example, in my default layout I call my menus (which are fuseactions) like so.
 
<cfmodule template="../../index.cfm" fuseaction="home.menu" layout="none">
 
Pretty handy.
 
Now if you have alot of different levels that you want to control, you need a naming convention for your variable.
 
attributes.layoutGrandParent
attributes.layoutParent
attributes.layoutChild
 
Then you can control all the layouts in a nested tree from one place.
 
<cfmodule template="#self#" fuseaction="GrandParent.home"
    layoutGrandParent="none"
    layoutParent="FancyTable"
    layoutChild="none">
 
At least thats what I have found to work well.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-----Original Message-----
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 6:55 PM
To: [EMAIL PROTECTED]
Subject: RE: How to turn off layout

Here's what I have been doing:
 

<!--- param the suppressLayouts and suppressHomeLayout variables --->

<CFPARAM name="suppressLayouts" default="false" type="boolean">

<CFPARAM name="suppressHomeLayout" default="false" type="boolean">

<CFIF (not suppressLayouts) and (not suppressHomeLayout)>

<cfset fusebox.layoutFile = "layDefaultHome.cfm">

<cfset fusebox.layoutDir = "">

<CFELSE>

<CFOUTPUT>

<cfset fusebox.layoutFile = "">

<cfset fusebox.layoutDir = "">

</CFOUTPUT>

</CFIF>

I create a single variable (suppressLayouts) that will turn off all of my layouts no matter how deep, and one (in this case suppresHopmeLayout) that is specific to the circuit.  That way in my switch I can do something like this:
 
<CFCASE value="nestedLayoutOff">
    <CFSET suppressNestedLayout = "true">
    <CFINCLUDE template="dspBlah.cfm">
</CFCASE>
 
Just how I do it.  I am sure there are better ideas out there.
 

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

-----Original Message-----
From: Marc Funaro [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 6:07 PM
To: Fusebox List (E-mail)
Subject: How to turn off layout

I have a fuseaction in a circuit app, where I wish to turn off the call to that circuit app's layout file ONLY (leaving the top-level layout file in the execution).
 
I have tried setting Fusebox.layoutfile = "dsp_BlankLayout.cfm" but it's still incorporating the dsp_DefaultLayout.cfm in the circuit directory, nested below the top-level dsp_DefaultLayout.cfm layout.
 
How do I change a nested layout only, for selected fuseactions?
 
And coincidentally, how would i change the top-level layout, if I wanted to do that too?
 
Thanks in advance,
 
Marc

Advantex
Technical Consulting Services

Marc Funaro, President

Macromedia Certified
Advanced ColdFusion
5.0 Developer

5547 State Highway 12
Norwich, NY 13815

VOX: 607-336-6895
FAX: 801-383-4864


 

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

Blue Cross Blue Shield of Florida, Inc., and its subsidiary and
affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.

Reply via email to