So my first assumption was right - you need to have common element in
non-AJAX layout. In this case all you need is call model function
Apple::getAppleInfo() in AppController beforeFilter/beforeRender that
will retrieve and set data for view and put $this-
>element('show_apples') into layout. And no any need for
requestAction, just simple model call and element output. Or, if logic
of your current ApplesController::getAppleInfo() is too complex for
model, put it into component and use it in AppController.On Feb 25, 11:46 pm, "Krissy Masters" <[email protected]> wrote: > LOL sorry. > > Try this again. > Imagine a 2 col layout left side is nav and under the nav are pictures of 4 > apples with text / size / price (these apple details are pulled when you > visit apples page / the index of apples.com) > > The sidenav has Apples / Oranges / Peaches > > You click on oranges it ajax loads oranges into the main col so the left > side never changed (good) But oranges has nothing to do with apples so you > do not get any apple info but since the left side never changed because the > link was ajax the 4 apples are still there as they were (good) > > Right click / bookmark open a oranges or peaches pages directly with HTTP > request your loading a fresh template / layout and apple element with the > apple element on the side but no apple info is pulled since its not related > at all. I need to get apple info on every page no matter what page your on, > or how you get to it so I figured if the apple element said to itself > everytime its loaded getAppleInfo() with requestAction this would solve the > problem. (some apples might be sold out, not in season) so apple data > changes thru out the users visit when http requests are made (other links > besides Oranges and Peaches) > > **I know about caching just left it out to not complicate thing even more > > Hope that gives you a better idea. > > Thanks. > > K > > > > > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > > Of Dr. Loboto > Sent: Friday, February 25, 2011 11:25 AM > To: CakePHP > Subject: Re: requestAction question > > Now I don't understand what do you need. Change other part of page > when load something by AJAX? Just make other AJAX request to update > this part too. > > -- > Our newest site for the community: CakePHP Video > Tutorialshttp://tv.cakephp.org > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > others with their CakePHP related questions. > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
