Thursday, June 3, 2010

Re: how to set session variable after render?

Not sure if that exists. If it doesn't, here's another idea...

- Before first page view, session variable doesn't exist, so set it to 1.
- Check the variable in the view; if it is 1, do the animation.
- On next page view the variable exists (1), so set it to 0.
- On page view, variable is not equal to 1, so animations doesn't happen.

Jeremy Burns
jeremyburns@me.com


On 3 Jun 2010, at 12:44, Anna P wrote:

> Hello.
>
> Just like in topic: how can I set session variable after page render?
>
> The issue is: on first visit on home page, I want to display several
> animations (logo sliding down, some not visible boxes appearing after
> timeout). But I want to display animations only once, on the first
> visit.
>
> I wanted to set function afterRender() in AppController and there set
> a session variable to switch between showing/not showing animations,
> but it seems there is no such function in 1.2.X
>
> How can I accomplish this?
>
> Many thanks in advance,
> Anna
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

No comments: