Wiki : HooksInTemplates
Documentation Home :: Categories :: Index :: Recent Changes :: Comments :: Search :: Help :: Login/RegisterHooks in Templates
If you ever wanted to use more than one display hook in your pnRender templates you will stumble over the problem that all hooks are shown one after the other at the same place.
The reason fo this is the simple
<!--[ pnmodcallhooks hookobject=item hookaction=display hookid=$topic.topic_id ]-->
(as taken from pnforum_user_viewtopic.html).
This glues all display hooks together in one piece.
Using
<!--[ pnmodcallhooks hookobject=item hookaction=display hookid=$topic.topic_id implode=false ]-->
instead assigns a new variable $hooks to the pnRender object.
This $hooks is an array of all the output from the display hooks activated, which can now be positioned in your template where ever you want them to appear, e.g.
<div class='trackback'>
<!--[ $hooks.trackback ]-->
</div>
.
. some more content
.
<div class='comments'>
<!--[ $hooks.EZComments ]-->
</div>Simple, but powerful.
