You're not thinking 
MVC<http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller>. 
If there's data that need to be taken into account through different 
application states (like a click that triggers a controller method) then 
the controller/model should manipulate it, not the view. If your reasoning 
was valid, almost all data that ended up in the view should be handled in 
the View, like if the user clicks on the logout link the view should do 
parse it.

On Sunday, June 16, 2013 2:24:42 PM UTC+3, David Suna wrote:
>
> Thanks for your response.
>
> As I had no choice that is what I ended up doing.  However, the 
> information I was interested in storing was only relevant to the view (i.e. 
> which menu was opened when the user clicked on a link) and only meant for 
> use in the view (reopen the menu that was opened at the time the user 
> clicked).  It seems that I have now pushed knowledge of the view into the 
> controller for an entirely arbitrary purpose.
>
> On Friday, June 14, 2013 11:08:57 PM UTC+3, John wrote:
>>
>> Your view is there to produce HTML not manipulate data (other than to 
>> display them). The proper MVC way is to do it in the controller and just 
>> pass the required data to the view to render it.
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to