One thing we are doing right now to have this sort of impact on the layout is to have the Default.vm layout be nothing more than an if/else statement, like so:

#if($userWantsFirstLayout)
  #parse("layouts/FirstLayout.vm")
#else
  #parse("layouts/TheOtherLayout.vm")
#end

In this way, the session selected is some variable that may be defined by the user (or in our case, by the screen) but you don't have to do anything too unnatural to get there. In our case, we are transitioning our whole site from a not-so-CSS based approach to a very CSS based approach, and rather than have to big bang the whole thing in we are trasitioning the screens a group at a time and setting some variable in the screen itself in order to decide which layout to use.

-Brian



On Jul 23, 2004, at 12:21 AM, [EMAIL PROTECTED] wrote:

Hi Scott,

what would suggest, if the user should be able to change his layout by a mouse click?

Thanks
Oliver


-------- Original-Nachricht -------- Betreff: Re: Change Layout in action Datum: Fri, 23 Jul 2004 09:57:29 +1000 Von: Scott Eade <[EMAIL PROTECTED]> Antwort an: Turbine Users List <[EMAIL PROTECTED]> An: Turbine Users List <[EMAIL PROTECTED]> Referenzen: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

Daniel wrote:

That should work...  Try using: "/NewLayout.vm" ?

Henning is going to flip out when he sees this - you are breaking one of
the two golden rules for using templates with Turbine - see:
http://jakarta.apache.org/turbine/turbine-2.3/services/template- service.html


(under the Usage heading).

I personally don't set any layouts from actions, but looking at the
JavaDoc I would say that in an action you should probably use:

     data.setLayout("NewLayout.vm");

The setLayoutTemplate() method is for changing the layout from within
the template itself (i.e. within the vm file for the template whose
layout you are changing).

Scott

--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Arcor-DSL: jetzt ohne Einrichtungspreis einsteigen oder wechseln
Sie sparen 99,95 Euro. Arcor-DSL ist in vielen Anschlussgebieten
verf�gbar. http://www.arcor.de/home/redir.php/emf-dsl-1


Arcor-DSL: jetzt ohne Einrichtungspreis einsteigen oder wechseln Sie sparen 99,95 Euro. Arcor-DSL ist in vielen Anschlussgebieten verf�gbar. http://www.arcor.de/home/redir.php/emf-dsl-1


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to