routing_backend

Allows adding custom routing rules for the user interface.

Team

Input (passed by reference)

$params['url'] string The URL of the routing rule applied to the current page’s section in the user interface.
… your plugin code …

Output

Team

Plugin code example

PHP

//event handler
public function routingBackend($params)
{
    return [
        'myplugin/' => 'backend/test',
    ];
}

//action
class teamMyPluginBackendTestAction extends waViewAction
{
    public function execute()
    {
        $this->setLayout(new teamDefaultLayout());
        $this->view->assign('text', _wp('Hi!'));
    }
}

HTML/Smarty

{* Action template example *}
<div class="block">Text: <strong>{$text}<strong></div>