Table of Contents
- intercept redirects after posts
- execute a redirect
When the action is changed to show after a POST request, DokuWiki will do a redirect. This event allows you to modify the redirect or prevent it altogether. It's signaled from act_redirect() in inc/actions.php.
The passed Doku_Event object has the fields:
$data field is an array with the entries:
- $data['id'] – the page id the redirect goes to
- $data['fragment'] – a fragment identifier if any (hash part of the URL)
- $data['preact'] – the (uncleaned) action before it was changed to
The BEFORE event handler let you modify the
$data field or stop with
preventDefault() the default action act_redirect_execute().
$result field is always null, and never set to a value by the default action. The AFTER event handler is default not reached, but only when default action is prevented.
- Code related to this event used in any DokuWiki's files, plugins and templates
devel/event/action_show_redirect.txt · Last modified: 2018-12-08 14:56 by torpedo