23.
Customizing the Menu
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
12 Comments
Hello there, is there a way to add a css attribute to a menu item ?
Hey Ahmedbhs,
I suppose so, try
css_classfor this. Check more information in the docs: https://symfony.com/bundles/EasyAdminBundle/2.x/book/menu-configuration.html#css-classes - though this version of EasyAdmin is legacy and not maintained anymore, I'd recommend you upgrade to the v3/v4 version instead, and we have a screencast about the updated EasyAdmin here: https://symfonycasts.com/screencast/easyadminbundleCheers!
Thanks very much for such a great tutorial :)
Hey Tanariel
Thanks for your kind words, we are very happy to hear you like our tutorials :)
Cheers!
Thanks for a great tutorial.
One question about menu: if we have admin and moderator (different roles), could we hide some menu items for Moderator (only admin can see all menu items)?
Hey Axa,
Really good question. Please, take a look at Javier's comment here: https://github.com/javiereg... - I think it will answer your question. In shorts, you can use CSS tricks to implement it, or by overriding EasyAdminBundle templates, where you can use is_granted() Twig function and do whatever you want. But for more complex things better use SonataAdminBundle instead.
Cheers!
Just for future reference - in v2 you can use permission option:
https://symfony.com/doc/mas...
Hello Victor,
I am reading last Javier's comment :(
Yes, Javier also said: "that this bundle supports only 80% of features. if you need 100% better to use Sonata." .
Issue is : you cannot know in advance what will need. For example, after a year , client can demand something and that can be nightmare.
Looks that better to avoid this bundle :(
Back to ugly sonata.
Hey @axa
Well, that's true, you never know what will be the next thing that your client will ask, but if your system doesn't heavily deppends on multiple Roles/Permissions, you could give it a try
Have a nice day
Hello Ryan,
Thank you very much for this nice tutorial.
I have a small (or big) question:
When I implement such an Application with EasyAdmin Bundle, I would like to make Mobile Apps with Ionic (2 or 3) to connect to the implemented EasyAdmin Bundle Web-App. I can imagine that I need to implement an API for data flow for Mobile Apps.
Which Knp University tutorial(s) would you suggest to implement an API to use with third party Frameworks to build Mobile Apps based on EasyAdmin Bundle?
Thanks in advance.
Hey Entwickler ,
Yes, sounds correct. Or maybe you even can implement Mobile App which is a wrapper for browser, so you will load this entire EasyAdmin dashboard, then you don't need to implement API endpoints at all. EasyAdmin responsive design is pretty good for mobile devices. Actually, it depends on your needs.
But what about API, we have an entire track about RESTful APIs, I think it all can be useful for you more or less, it's a complex question, you know. Just depends on how strong your knowledges about it. Check it out here: https://knpuniversity.com/t...
There're also a Symfony-related RESTful APIs screencasts where you can find some useful bundles as well: https://knpuniversity.com/t...
Cheers!
Thank you very much @victor
I started Symfony RESTful API course.
"Houston: no signs of life"
Start the conversation!