|
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
==^================================================================ 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 | ||||||||
- How to turn off layout Marc Funaro
- RE: How to turn off layout Timothy Heald
- RE: How to turn off layout Gallant, Ron
- RE: How to turn off layout Gallant, Ron
- RE: How to turn off layout Gallant, Ron
- RE: How to turn off layout loryn . williams
- Re: How to turn off layout Lee Borkman
- Re: How to turn off layout loryn . williams
- RE: How to turn off layout Patrick McElhaney
- Re: How to turn off layout John Quarto-vonTivadar
- Re: How to turn off layout - loryn . williams
- RE: How to turn off layout pmcelhaney
- RE: How to turn off layout pmcelhaney
