diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index b3cdf30..64b2ef3 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,2 +1,4 @@ twig: default_path: '%kernel.project_dir%/templates' + globals: + menuLinks: '@App\Repository\MenuLinkRepository' diff --git a/src/Repository/MenuLinkArrayRepository.php b/src/Repository/MenuLinkArrayRepository.php new file mode 100644 index 0000000..210503c --- /dev/null +++ b/src/Repository/MenuLinkArrayRepository.php @@ -0,0 +1,43 @@ + 'Conference', + 'children' => [ + ['name' => 'Trainings'], + ['name' => 'Contribution Day'], + ['name' => 'About FLDC'], + ['name' => 'Speaker Info'], + ['name' => 'Contact'], + ], + ], + [ + 'name' => 'Sponsors', + 'children' => [ + ['name' => 'All sponsors'], + ['name' => 'Become a sponsor'], + ], + ], + [ + 'name' => 'Community', + 'children' => [ + ['name' => 'Code of Conduct'], + ['name' => 'Tourism'], + ['name' => 'Mailing List'], + ], + ], + [ + 'name' => 'FAQ', + 'children' => [], + ], + ]; + } +} diff --git a/src/Repository/MenuLinkRepository.php b/src/Repository/MenuLinkRepository.php new file mode 100644 index 0000000..084a386 --- /dev/null +++ b/src/Repository/MenuLinkRepository.php @@ -0,0 +1,10 @@ + +
+
+ + + +
+ +
+ +
+
+
+ +
+ diff --git a/templates/page.html.twig b/templates/page.html.twig index 2429030..370270d 100644 --- a/templates/page.html.twig +++ b/templates/page.html.twig @@ -1,5 +1,7 @@ {% extends 'html.html.twig' %} {% block body %} + {% include 'includes/navbar.html.twig' %} + {% block content %}{% endblock %} {% endblock %}