Re: how to set session variable after render?
There is afterFilter(). http://book.cakephp.org/view/60/Callbacks On Jun 3, 6:44 pm, 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: how to set session variable after render?
Does $this->Session->write() not work? I know cookies are sent in the http header, so they can't be modified after the page content has been sent to the user (though Cake uses output buffering, so perhaps you can still modify headers at that point), but session data is kept server side. On Jun 3, 4:49 am, Jeremy Burns wrote: > 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 > jeremybu...@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 sitehttp://cakeqs.organd 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+unsubscr...@googlegroups.com For more options, visit this group > > athttp://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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
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 jeremybu...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
how to set session variable after render?
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en