# Extend admin sidebar

To extend the administration sidebar with custom sidebar links to e.g. custom pages, you can easily integrate the&#x20;

```php
public function administrationMenu(Menu $sidebarMenu)
```

in the [base class](https://docs.hostware.io/developer-documentation/module/fundamentals/base-class) of your module. You will get an instance of App\Framework\Core\Menu\Menu and should return the menu. In the meantime, you can add custom menu items.

You are allowed to add menu items on the first level, but you can also create sub-items of already existing sidebar items. This can look as following:

```php
class dashservVps implements ModuleBase {
    public function activate(ModuleLifecycleContext $lifecycleContext) {}

    public function deactivate(ModuleLifecycleContext $lifecycleContext) {}

    public function install(ModuleLifecycleContext $lifecycleContext) {}

    public function uninstall(ModuleLifecycleContext $lifecycleContext) {}


    // the magic happens in this method!
    public function administrationMenu(Menu $sidebarMenu): Menu {
        // menu item on the first level
        $sidebarMenu->addChild(new MenuItem(
            "dsahservvps",
            "dashserv VPS",
            route('dashserv-vps.index'),
            "boxes"
        ));

        // menu item on the second level (child)
        $sidebarMenu->getChild('hosting')->addChild(new MenuItem(
            "dashservvps-with-parent",
            "dashserv VPS child",
            route('dashserv-vps.index'),
        ));

        return $sidebarMenu;
    }
}
```

The result will look like this:

<figure><img src="https://4059027548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnJHcdSq7NNv7Ws704nzw%2Fuploads%2FHSgtoD22w0ElDUxBvmRN%2Fimage.png?alt=media&#x26;token=5378253e-19fb-499a-8caa-ab77654cc6e6" alt=""><figcaption></figcaption></figure>
