Re: smarty custom function jojoHook , a forum discussion on Jojo CMS. Join us for more discussions on Re: smarty custom function jojoHook on our General Discussion forum.
You must be logged in to post a reply
| |
synfield
25th July
Posts: 36
I'm curious to know what {jojoHook hook="productBeforeBody"} and {jojoHook hook="productAfterBody"} means - these are found in the articles plugin template.
I've had a cursory look at the runSmartyHook function in the main JOJO class, which to me loads & runs a function from a plugin class.
But I've done a global find in the site directory and no function seems to be defined for this.
Would appreciate some insight into how this works.
Thanks.
I've had a cursory look at the runSmartyHook function in the main JOJO class, which to me loads & runs a function from a plugin class.
But I've done a global find in the site directory and no function seems to be defined for this.
Would appreciate some insight into how this works.
Thanks.
You mean {jojoHook hook="articleBeforeBody"} right?
These hooks are for allowing other plugins to add content to the template.
For a practical example of how this works, have a look at the jojo_blogicons plugin - which inserts a row of Digg, Technorati, Furl etc icons using the articleAfterBody hook.
These hooks are for allowing other plugins to add content to the template.
For a practical example of how this works, have a look at the jojo_blogicons plugin - which inserts a row of Digg, Technorati, Furl etc icons using the articleAfterBody hook.
synfield
28th July
Posts: 36
Does this function e.g. articleBeforeBody, get loaded into the $_hooks global array at runtime or at setup.
I tried to print_r this variable in the runSmartyHook function in the main JOJO class but this doesn't print to screen when accessing a template with {jojoHook hook="articleBeforeBody"} .
So how then does the runSmartyHook function find the class, that the function articleBeforeBody belongs i.e. where does the global var $_hook get populated, in order to find the class name $classname = 'JOJO_Plugin_' . $hook[0];
Regards.
I tried to print_r this variable in the runSmartyHook function in the main JOJO class but this doesn't print to screen when accessing a template with {jojoHook hook="articleBeforeBody"} .
So how then does the runSmartyHook function find the class, that the function articleBeforeBody belongs i.e. where does the global var $_hook get populated, in order to find the class name $classname = 'JOJO_Plugin_' . $hook[0];
Regards.
| Back to Forum Index : Back to General Discussion |
|
