When you execute a forward(), your action class is re-instatiated
therefore all the variables you set before the forward are lost. To
get around this you should look at using a flash.
http://www.symfony-project.org/book/1_1/06-Inside-the-Controller-Layer#Flash%20Attributes
Regards,
Jamie Learmo
Hello,
Keep in mind that you have one action for one template. You should not
used more than one action to render one tempate.
Thomas
On Mon, Sep 8, 2008 at 10:17 AM, Sumedh <[EMAIL PROTECTED]> wrote:
>
> Yeah, but this doesn't work if there another action getting executed
> as I said above...
Yeah, but this doesn't work if there another action getting executed
as I said above...
On Sep 8, 1:05 pm, "Gareth McCumskey" <[EMAIL PROTECTED]> wrote:
> $this->variable = "value";
>
> Then on template you can just access $variable
>
> On Mon, Sep 8, 2008 at 9:22 AM, Sumedh <[EMAIL PROTECTED]> w
$this->variable = "value";
Then on template you can just access $variable
On Mon, Sep 8, 2008 at 9:22 AM, Sumedh <[EMAIL PROTECTED]> wrote:
>
> Okk...thanks for the info...
>
> Now if I have a situation like this -
>
> 1. Action A sets a few variables.
>
> 2. Action A, on some condition, forwar
Okk...thanks for the info...
Now if I have a situation like this -
1. Action A sets a few variables.
2. Action A, on some condition, forwards to Action B
3. Action B sets a few more variables.
4. A template gets executed from Action A, in case when Action B is
not executed.
5. A template get
This is because the template variables get added as template variables
in the __set() magic method of sfComponent which only gets called when
you set variables within the class and not on initialization.
Add $this->map_latitude = 12.45 in your preExecute() method of your
action.
Jamie Learmonth