Still don't get it, maybe you need to show us your real world example of how the element is communicating with the layout and other elements. That way we can understand and someone can solve or offer an alternative solution.
At the initial page load, all elements should have their data passed to them via the main controller action or their own requestAction, I would fire separate ajax requests for other elements if they are to be updated due to a DOM change. I'm not sure the documentation does specifically say that elements can set vars, did you read that from here? http://book.cakephp.org/view/1081/Elements You can set variables from the controller (to the view) and the view (to the layout) but elements are not supposed to go to anything else, they are the end of the line. HTH, Paul @phpMagpie On Sep 5, 11:37 am, Xoubaman <[email protected]> wrote: > Me neither, until now :) > > On the topic of setting vars in an element, regardless of it being wrong or > not, the point is that it's possible. At least the doc says so, but it's not > working for me (the Var::set() method). > > You may have an element that gets data from requestAction and, depending on > the returned values, subsecuent layout contents will need different vars > defined. -- 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
