Table of Contents
- enhance or replace namespace templates
- find a namespace template, load it and run pattern replacements on it
This event is signaled by pageTemplate() in inc/common.php when a new page is to be created (loaded into the editor), handlers can use it to load their own namespace templates or manipulate loaded data before being used by the editor.
Plugins usually want to intercept the BEFORE event. If your plugin sets either the
tpl or the
tplfile info, the usual template lookup will be skipped and your provided data will be used. Setting
doreplace to false will skip the pattern replacements.
Intercepting the AFTER event will give you access to the template data after replacements have been done.
- $data['id']: The ID of the new page
- $data['tpl']: The page template content (empty in BEFORE)
- $data['tplfile']: The page template to load (empty in BEFORE)
- $data['doreplace']: Shall pattern replacements be used (defaults to true)
- Code related to this event used in any DokuWiki's files, plugins and templates
- This event replaces HTML_PAGE_FROMTEMPLATE and COMMON_PAGE_FROMTEMPLATE
devel/event/common_pagetpl_load.txt · Last modified: 2018-12-08 15:05 by torpedo