Another approach is to do it via OOP design.

Either use a Strategy for each user/group,
or use inheritance, extending/modifying the object for each user/
group.

On Sep 17, 8:34 am, Gustavo Adrian <comfortablynum...@gmail.com>
wrote:
> Create a baseAction with a preExecute method where you check which user is
> logged in, and change the layout accordingly. Then, extend your own actions
> from this baseAction:
>
> // myApp/lib/actions/baseAction.class.php
> class baseAction extends sfActions
> {
>     public function preExecute()
>     {
>         parent::preExecute();
>
>         // Here you check your user with your own logic
>         if ( $myUserIsFromIBM )
>         {
>             $this->setLayout( 'IBMLayout' );
>         }
>         else
>         {
>             $this->setLayout( 'anotherLayout' );
>         }
>     }
>
> }
>
> Then in your actions, just extend from the baseAction
>
> class homeAction extends baseAction
> {
>     public function preExecute()
>     {
>          parent::preExecute();
>
>          // Do other stuff here
>     }
>
> }
>
> Best regards.
>
> On Fri, Sep 17, 2010 at 8:56 AM, marc <eilh...@ausschnitt.de> wrote:
> > Hi everyone,
>
> > i'm playing around with symfony 1.4 for about two month now and i like
> > it very much.
> > I'm thinking about replacing our portal with a symfony application.
> > For that i need to implement individual user layouts. We have
> > customers that want to have their portal in corporate style. So i
> > wonder how i could get this in symfony. The system has to be able to
> > change the layout and the module templates by user authentication and
> > the different Styles should be easy to maintain.  Just some ideas
> > would be great.
>
> > Thank you,
> > Marc Eilhard
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to