Customize links in the control panel
pooria - 2 months ago
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 - 2 months ago
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.