Customize links in the control panel
Created 6 years ago by pooria

Hi

First of all, thank you for this great project that definitely rocks! but I find it very confusing as a beginner, specially I think the docs are not really easy to understand (I wish it followed the Laravel's docs way). I tried to find out how to customize the main menu in the admin panel but I couldn't find anything. I came into this file: sidebar.twig and this variable: template.cp.navigation. But I couldn't find the variable itself.

I think my main problem is that I don't understand Streams and confused in modules, fields, assignments, ....

Sorry If it looks like dumb; But I'm sure I will get better soon. If I had enough time, I would have dug deeper into it by myself before asking questions. Thanks a lot.

ryanthompson  —  6 years ago Best Answer

You can also go into settings / preferences -> themes -> "Accelerant Theme" and modify the ordering of what's available.

To inject your own you can use the listener for: https://github.com/anomalylabs/streams-platform/blob/1.3/src/Ui/ControlPanel/Component/Navigation/Event/GatherNavigation.php

Push on your own instances of https://github.com/anomalylabs/streams-platform/blob/1.3/src/Ui/ControlPanel/Component/Navigation/NavigationLink.php and then they'll go into ordering which you can override in settings/preferences as mentioned above.

That's how the core addons will be extending the navigation with "virtual" addons soon.

edster  —  6 years ago

You say that you are trying to customize the admin nav, can you elaborate on that. what exactly are you trying to do?

Are you trying to add items to the navigation bar? If so you need to create and install a module, which ties into the nav bar.

ryanthompson  —  6 years ago Best Answer

You can also go into settings / preferences -> themes -> "Accelerant Theme" and modify the ordering of what's available.

To inject your own you can use the listener for: https://github.com/anomalylabs/streams-platform/blob/1.3/src/Ui/ControlPanel/Component/Navigation/Event/GatherNavigation.php

Push on your own instances of https://github.com/anomalylabs/streams-platform/blob/1.3/src/Ui/ControlPanel/Component/Navigation/NavigationLink.php and then they'll go into ordering which you can override in settings/preferences as mentioned above.

That's how the core addons will be extending the navigation with "virtual" addons soon.

pooria  —  6 years ago

@edster I want to control it, to remove them or change their icon or text or ...

pooria  —  6 years ago

@ryanthompson Thank you. So what is the difference between Settings and Preferences?

edster  —  6 years ago

@pooria Settings is system settings, preferences can be user defined.

pooria  —  6 years ago

@edster So why do they look alike? It's really confusing. For example they both have the exact same page for Accelerant theme's settings 🙍

edster  —  6 years ago

So in that instance the ones in settings would be the system defaults, then, on a per user basis. they can go in and customize there own under preferences.

pooria  —  6 years ago

@edster Oh now I get it. But I wish it was mentioned in the docs. I'm trying to learn more on Youtube. sorry for bothering. Thanks.