what is the difference for the view() and on_start() functionalities

Permalink 3 users found helpful
Hi concrete team
I want know the functionality of
view() and on_start() in the controller page





thanks
Kumar

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
view() is run just before the content of the view is rendered, so way after all headers have been output. The usual use of view() is to set up data for the single page or block view.

In a page or package controller on_start() ( or for a block, on_page_view() ), is run before any headers are output, so can be used to add css or script to headers, set up event handlers (and more).
shankumars replied on at Permalink Reply
thanks John.....
appatucker replied on at Permalink Reply
appatucker
Eppa paathalum puruyaadha maadhiriye pesikitu irukiye @John...
It's Very Help full...
shankumars replied on at Permalink Reply
Yeah you exactly right @appatucker :)
ruba replied on at Permalink Reply
Thanks
Uranus replied on at Permalink Reply
Uranus
It's really helpful