Hi,
We had the same problem. A solution:
Use CF_BODYCONTENT for the layout. And something CONDITIONAL for the layout
template at the bottom of the index.cfm
e.g.
<CF_BODYCONTENT>
<!--- Set our Default Fuseaction. --->
<CFPARAM NAME="attributes.fuseaction" DEFAULT="list_news">
<CFPARAM NAME="attributes.displaylayout" DEFAULT="true">
<CFSWITCH EXPRESSION="#attributes.fuseaction#">
<CFCASE VALUE="someaction">
</CFCASE>
.....more actions....
</CFSWITCH>
<!--- end of fuseaction definitions --->
</CF_BODYCONTENT>
<!--- this is different. A condition is added --->
<CFIF attributes.displaylayout>
<CFINCLUDE TEMPLATE="#request.templateroot#app_layout.cfm">
<CFELSE>
<CFOUTPUT>#request.bodycontent#</CFOUTPUT>
</CFIF>
<!--- end of index.cfm --->
So if you call your fusebox now as a customtag you could use:
<CFMODULE template="/somefusedir/index.cfm"
FUSEACTION="somaction
DISPLAYLAYOUT="false"
>
if you want to prevent display of the menu.
This works quite well. But you have to be aware that anyone can hide your
menu by adding the displaylayout on the URL. If you want to prevent this for
some interesting reason, you coul add some extra code. There are also other
ways to protect this but the principle remains the same.
Regards
Wil
-----Original Message-----Subject: [Fusebox] Fusebox as tag - Display
problems!!!!
From: Russell Jones
To: [EMAIL PROTECTED]
Sent: 20-9-00 16:49
Someone in allaire's forums recently mentioned a problem that I am
running
into now.
====
Calling a Fusebox application as a tag (i.e. calling the index.cfm file
through cfmodule/cfinclude) can have advantages and disadvantages.
The main advantage is that you can encapsulate complex file management
and
processes through the very simple tag structure that is built into
ColdFusion. So instead of trying to figure out what files are needed to
do
some action, you simple need to know the path of the index.cfm file
(i.e.
template="/directory/index.cfm") the fuseaction you want to call (i.e.
fuseaction=somefuseaction) and any other variables that are needed for
that
specific fuseaction.
The main disadvantage is when dealing displays. For example if you
include a
layout display file that contains a menu within your application, then
call
that application from some parent application that already contains that
menu layout you'll end up with two menus on the page. Which is most
likely
not what you want.
* http://forums.allaire.com/devconf/Index.cfm?Message_ID=572223
====
Have any of you run into this, and how did you over come it?
I'm sitting at my desk right now, sipping a frosty cola beverage waiting
for
someone to chime in. Please feel free to email me directly.
Thanks a ton.
-Russ
------------------------------------------------------------------------
------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.