Tracking {udt} calls following HTML semantic order
Posted: Sat Feb 18, 2012 2:23 am
I created a simple module who provide an {udt}.
Every parameters call of the {udt} are logged in $_SESSION['my_udt'][] = array();.
I used 'ContentPostRender' event's, to know when to stop logging {udt} calls.
Perfect ! I catch all calls ... but their order is 'weird'. The {udt}'s calls, who are stored in templates were logged at the end of my $_SESSION stack.
After some research i found that it was due to what explain Calguy here.
'process_whole_template', is supposed to be off, therefore, the template is processed this way:
a) the body
b) the head
If i set $config['process_whole_template'] to true, my issue is solved, the order of my {udt} calls are, in the intended order , semantic'.
Does anyone can help me to know if my {udt} is called from 'the head' or 'the body', so it would be easy to reorder my calls without setting process_whole_template to true.
I dig in this way, http://forum.cmsmadesimple.org/viewtopi ... =6&t=38543 but those events are still misteries to me and they don't even seem's to help me in this case
Every parameters call of the {udt} are logged in $_SESSION['my_udt'][] = array();.
I used 'ContentPostRender' event's, to know when to stop logging {udt} calls.
Perfect ! I catch all calls ... but their order is 'weird'. The {udt}'s calls, who are stored in templates were logged at the end of my $_SESSION stack.
After some research i found that it was due to what explain Calguy here.
'process_whole_template', is supposed to be off, therefore, the template is processed this way:
a) the body
b) the head
If i set $config['process_whole_template'] to true, my issue is solved, the order of my {udt} calls are, in the intended order , semantic'.
Does anyone can help me to know if my {udt} is called from 'the head' or 'the body', so it would be easy to reorder my calls without setting process_whole_template to true.
I dig in this way, http://forum.cmsmadesimple.org/viewtopi ... =6&t=38543 but those events are still misteries to me and they don't even seem's to help me in this case