Implement a macro to display a button in an active state. Macro call interface:
{{ btn("Button text", "url", true, "warning") }}
should generate the following markup
<a href="url" class="btn btn-warning">Button text</a>
if the third parameter is false, then display
<a href="url" class="btn btn-link">Button text</a>
if the fourth parameter is not specified, then for {{ btn("Text on button", "url", true) }} display a button in the primary style
<a href="url" class="btn btn-primary">Text on button</a>
Display the button using a macro in all places in your application where the button is displayed.
Create a sub-template for the list element on the main page and connect it using include.
Examples of working with include and macro can be found in the documentation [https://twig.symfony.com/doc/3.x/tags/include.html] (https://twig.symfony.com/doc/3.x/tags/include.html) and https://twig.symfony.com/doc/3.x/tags/macro.html