It's better when it's simple

User Tools

Site Tools


Table of Contents


Output XHTML before and/or after a page
Outputs XHTML for the choosen $ACT command

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.

See also

devel/event/tpl_act_render.txt · Last modified: 2018-12-08 16:10 by torpedo

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki