Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Documentation Wiki

Most recent edit on 2008-06-19 07:07:28 by Operator Minor edits (spelling & grammar corrections, etc.). Minor re-writes of draft.

Additions:
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 at the same place, one after the other.
The reason for this is simple:
(The above code was taken from pnforum_user_viewtopic.html.)
This 'glues' all display hooks together in one piece.
Instead, use the following code, which assigns a new variable $hooks to the pnRender object.
This variable $hooks is an array of the output from all the display hooks activated, which can now be positioned in your template where ever you want them to appear. For instance:
This solution is simple but effective.

CategoryDeveloperDocs


Deletions:
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
(as taken from pnforum_user_viewtopic.html).
This glues all display hooks together in one piece.
Using
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.
Simple, but powerful.



Oldest known version of this page was edited on 2007-02-26 17:17:39 by kaffeeringe.de [ initial page ]

Hooks 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.
Last Revision :
Last Editor :
Owner :

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to Zikula