backend_tutorial

Adds custom content to navigation panel of backend tutorial screen.

Shop-Script

Input (passed by reference)

No specific parameters.
… your plugin code …

Output

{$backend_tutorial.%plugin_id%.sidebar_li}

Array of links pointing to custom tutorial steps. Each array item must be a sub-array with the following keys: 'name'—link text; 'href'—key of tutorial step; 'complete'—flag denoting whether this step has been completed.

{$backend_tutorial.%plugin_id%.sidebar_block}

Custom HTML code to be displayed at the bottom of the sidebar; e.g., JavaScript code for the processing of custom steps’ links added in the 'sidebar_li' item of the returnd array.

Shop-Script

Plugin code example

PHP

public function backendTutorial()
{
    return array(
        'sidebar_block' => '<script>
$.tutorial.myfirstAction = function () {
    this.load("?plugin=my&module=tutorial&action=first");
};
$.tutorial.mysecondAction = function () {
    this.load("?plugin=my&module=tutorial&action=second");
};
</script>',
        'sidebar_li' => array(
            array(
                'href' => '#myfirst',
                'name' => 'My action 1',
                'complete' => false,
            ),
            array(
                'href' => '#mysecond',
                'name' => 'My action 2',
                'complete' => false,
            ),
        ),
    );
}