Re: [symfony-users] Re: Multiple actions in one page

2010-04-27 Thread Javier Garcia
On 04/22/2010 10:50 AM, Gareth McCumskey wrote: If you need to have different "content areas" in your main layout then use slots. Thats what they were defined for;) Hi Gareth, i'm suspicious with your answer because i think you spent many time with sf, could you give more details? i can'

Re: [symfony-users] Re: Multiple actions in one page

2010-04-23 Thread Javier Garcia
Hi again, I have a new way. This time the form is not processed by the component but by the action, so no problem this time to use redirect(). What's your opinion? modules/miembros/actions/actions.class.php |public function executeAux(sfWebRequest $request) { return $this->renderParti

Re: [symfony-users] Re: Multiple actions in one page

2010-04-23 Thread Javier Garcia
On 04/23/2010 11:43 AM, Poltasi Risom wrote: but when you failed to login action would show the form in the main area In my way, if the user fails logging, the form is showed in the main area (miembros/aux). Or maybe i don't understand you.. Thanks Daniel your way works! -- If you want

[symfony-users] Re: Multiple actions in one page

2010-04-23 Thread Poltasi Risom
Yes, component template is as you described (is showing aside) modules/miembros/templates/_signin.php renderLabel() ?> ... but when you failed to login action would show the form in the main area On Apr 22, 10:39 pm, Javier Garcia wrote: > On Apr 22, 7:45 pm, Poltasi Risom wrot

[symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Annis McKenzie
Did you read what I wrote last? There is a slight error in this but you *can* redirect in a component like so: $this->getController()->getActionStack()->getLastEntry()- >getActionInstance()->redirect($url); It's rather long-winded but it is a valid way to do it, cheers, Daniel On Apr 22, 9:39 p

[symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Javier Garcia
On Apr 22, 7:45 pm, Poltasi Risom wrote: > modules/user/actions/components.class.php > ... > public function executeShowLoginForm(){ >   $this->loginForm = new SigninForm();} > > modules/user/actions/actions.class.php > ... > public function executeSignin( sfWebRequest $request ){ >    $this->for

[symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Poltasi Risom
sorry if ( $this->form->isValid() ){ $this->redirect( '@home' ); } is right condition to redirect On Apr 22, 8:45 pm, Poltasi Risom wrote: > Why, why do you need redirect from component to another page? > User requests are directed to actions, not to the components > > for instance > modu

[symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Poltasi Risom
Why, why do you need redirect from component to another page? User requests are directed to actions, not to the components for instance modules/user/actions/components.class.php ... public function executeShowLoginForm(){ $this->loginForm = new SigninForm(); } modules/user/actions/actions.class.

Re: [symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Daniel Lohse
This is rather complicated and just because I am not currently at my Mac, I'll have to try from memory. :) So, in your component you can get to the redirect method this way: $this->getController()->getActionStack()->getLastEntry()->redirect(); I hope this is accurate — if it's not, you'll h

[symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Javier Garcia
On Apr 21, 7:11 pm, gopi wrote: > thx for the clarification. I just tried using form in a component and > it works. I did also that, but... how do you redirect to another page using components You know after the logging you have to redirect the user to the "Profile" page for example.. Jav

Re: [symfony-users] Re: Multiple actions in one page

2010-04-22 Thread Gareth McCumskey
If you need to have different "content areas" in your main layout then use slots. Thats what they were defined for ;) http://www.symfony-project.org/book/1_0/07-Inside-the-View-Layer#chapter_07_sub_slots On Wed, Apr 21, 2010 at 7:16 PM, Poltasi Risom wrote: > If you need to display search form o

[symfony-users] Re: Multiple actions in one page

2010-04-21 Thread Poltasi Risom
If you need to display search form on one particular page init it in the action. But if you want to have search form been shown through all site - possibly component is a good way to init form. And include it in the higher-level template (in the layout, for example). This applies the login form als

[symfony-users] Re: Multiple actions in one page

2010-04-21 Thread gopi
hi Daniel, thx for the clarification. I just tried using form in a component and it works. thx gopi On Apr 21, 9:48 pm, Daniel Lohse wrote: > Why wouldn't it be possible to display symfony forms from components? That > would be *i n s a n e*. A form is just an object you pass onto the view. >