In my layout.html.twig, I have a navigation bar with some links. I want the links to be populated from the database.
For example, in the navigation bar, I see "Recent Products." How can I populate the dropdown in main layout.html.twig from the database? (of course, it will be cached in the future)
Do I need to create a filter?
Any help would be great. Thanks
Note. In Symfony 1.4, I would use a component. Does this exist in symfony 2?
source
share