DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy

devel:event:common_pagetpl_load

COMMON_PAGETPL_LOAD

Description:
enhance or replace namespace templates
DefaultAction:
find a namespace template, load it and run pattern replacements on it
Preventable:
yes
Added:
2011-02-03

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.

Passed Data

  • $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)

See also

devel/event/common_pagetpl_load.txt · Last modified: 2018-12-08 15:05 by torpedo