Usage as a Singleton
DanielFatkic opened this issue · 4 comments
Is there a way to use the breadcrumbs as a singleton?
I'd like to set the breadcrumbs global on kernel.controller but i'd also like to add additional breadcrumbs via the controller.
e.g.
addItem('home');
if (foo){
addItem('members");
and then inside of the controller i'd like to set the last item.
if i do this in the controller, the items which i added on kernel.controller are deleted
if it's not possible, i'd like to suggest this:)
This is a good idea +1 from my site because I don't want to set my home in each controller action :(
Maybe there is a way to use a before filter on controller a controller base?
@ragtek can you provide more details (code) of what you've tried? I've just created a listener which adds a breadcrumb on the kernel.controller
event, followed by some more in a controller action, and all the breadcrumbs render successfully.
ping @ragtek - did you get any further with this? I couldn't reproduce - if you have some sample code, that would be great :-)
Closing this as I can't reproduce. Please feel free to reopen if you're still having issues :-)