If you are perhaps referring to the global layout template housed under
apps/appname/templates ( as opposed to the ones in
apps/appname/modules/modulename/templates), then you can set the template
per action. Within your action use:

sfAction::setLayout('other_layout');

On Mon, Nov 23, 2009 at 2:55 PM, Alexandre SALOME <
alexandre.sal...@gmail.com> wrote:

> Hi,
>
>   Watch your vocabulary. Symfony's one :
>
>
>    - Project
>    - Applications
>    - Modules
>    - Actions
>
> You can dynamically change the template using the setTemplate method :
>
> class myActions extends sfActions
> {
>   public function executeIndex(sfWebRequest $request)
>   {
>     // same treatment
>     if ($myCondition)
>     {
>       $this->setTemplate('otherTemplate');
>     }
>   }
>
> So you will have to create a new template : otherTemplateSuccess.php in
> your modules/my/templates folder.
>
> No need for another application :)
>
> Is it ok ?
>
> 2009/11/23 HAUSa <jeroen_heeft_behoefte_aan_r...@hotmail.com>
>
> I need to have a different main template for just one action. Is that
>> possible, or do I have to create a complete seperate app for that?
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@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=.
>>
>>
>>
>
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.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-us...@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=.
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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=.


Reply via email to