This is an old revision of the document!
Table of Contents
TPL_ACT_RENDER
- Description:
- Output XHTML before and/or after a page
- DefaultAction:
- Outputs XHTML for the choosen [[devel:environment
- Preventable:
- yes
- Added:
- 2006-04-25
The event is signalled by tpl_content() in inc/template.php. You can use this event to output XHTML before and/or after the main Dokuwiki page output and can prevent the default dokuwiki page generation taking place. Output buffering is active during this event, the captured output is passed to the event TPL_CONTENT_DISPLAY.
Passed Data
The passed Doku_Event object has the fields: $data
and $result
.
The $data
field contains the contents of the $ACT variable. The $ACT
variable is assigned by reference, so updating $data
will update $ACT
as well.
The BEFORE event handler can modify the $data
field to change the action command and the default action tpl_content_core() can be prevented. This function handles all default content XHTML generation actions or the registered TPL_ACT_UNKNOWN ones.
The $result
field is set to true by the default action if a defined $ACT was handled, false otherwise. The AFTER handler is finally called.
Plugins handling this event
The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.