- 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.
The passed Doku_Event object has the fields:
$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.
$result field is set to true by the default action if a defined $ACT was handled, false otherwise. The AFTER handler is finally called.