Hi B, Yes it's permitted, but it's a whole different question as to whether it's a good idea to actually do it the way you have suggested.
Certainly my preferred solution is to avoid explicit references in one component to the internals of another. In this case, you have a layout file that is explicityle referring to a circuit and a fuseaction by name. That's dangerous. What if the circuit and the fuseaction's names change? There are many ways that this creates a maintenance risk. A better policy is for your components to pass messages to each other, carrying all the information that is required for the various components to do their jobs. In this case, I would suggest that your home.admin fuseaction sets some kind of flag that is later used by the layout file. For example, in the home.admin fuseaction: <cfcase value="admin"> <cfinclude template=blah blah> ... <cfset attributes.verboselayout=true> </cfcase> Then, in your layout file: <cfif attributes.verboselayout> additional layout </cfif> Even better would be to set a content-specific flag or piece of metadata in your fuseaction. After all, what does a fuseaction know about layouts, and why would it ask for a verbose layout? Ask yourself the question: what is it about home.admin that makes extra layout necessary? Set a flag that carries *that* piece of information, and then let the layout file decide what to do about it. An example might be #attributes.contentHasAttachments#. You see how that piece of information has nothing explicitly to do with layouts, but a layout file can *use* that information to make its own layout decisions. Is that making any sense? LeeBB ps, this has all been a topic of some controversy on the steerfb list lately ;-) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Hi all, I have a basic shell that will serve as my main layout, but depending on the fuseaction, I need to include addition code in the layout. Is conditional processing allowed in the layout file? i.e. <cfif attributes.fuseaction is "home.admin"> additonal layout html </cfif> Or are you only supposed to put: <cfoutput>#fusebox.layout#</cfoutput> in the layout file? Thanks.. IMPORTANT NOTICE: This e-mail and any attachment to it is intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. If you receive this e-mail in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient. The RTA is not responsible for any unauthorised alterations to this e-mail or attachment to it. ==^================================================================ 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 ==^================================================================
