dilusha100 - 2 months ago

There are several links in dashboard side bar ( By side bar I meant the black vertical bar in left side of the screen :-P ). But I need to add some different links to that bar like some link to another site or short cut to frequent actions in admin panel.

So what is the way to achieve this.......

ryanthompson - 2 months ago

Hi! You can hook into an event and get the ControlPanelBuilder instance and add navigation like this:

Listen to \Anomaly\Streams\Platform\Ui\ControlPanel\Component\Navigation\Event\GatherNavigation and then use $builder = $event->getControlPanel();

You can add nav to it like this:

$item = [
    'breadcrumb' => 'Test Space',
     'icon'      => 'fa fa-icon',
     'title'       => 'Click Me',
     'href'       => 'admin/slug-example',

$builder->addNavigation('slug-example', $item, $position = null);

There is also an event fired later for sorting (you can sort from preferences too and it defaults to alpha-numeric): \Anomaly\Streams\Platform\Ui\ControlPanel\Component\Navigation\Event\SortNavigation