Skip to content

Commit c37ea3b

Browse files
wachterjohannesniklasnatter
authored andcommitted
03 - Add a footer navigation to the website
1 parent 3c66779 commit c37ea3b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

config/webspaces/example.xml

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
<title lang="de">Hauptnavigation</title>
3232
</meta>
3333
</context>
34+
<context key="footer">
35+
<meta>
36+
<title lang="en">Footer Navigation</title>
37+
<title lang="de">Footernavigation</title>
38+
</meta>
39+
</context>
3440
</contexts>
3541
</navigation>
3642

templates/base.html.twig

+7-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@
5757
<footer class="footer mt-auto py-3">
5858
{% block footer %}
5959
<div class="container">
60-
<span class="text-muted">Copyright {{ 'now'|date('Y') }} SULU</span>
60+
{% for item in sulu_navigation_root_flat('footer') %}
61+
<a href="{{ sulu_content_path(item.url) }}">{{ item.title }}</a>
62+
63+
{% if not loop.last %}&nbsp;|&nbsp;{% endif %}
64+
{% endfor %}
65+
66+
<span class="text-muted float-right">Copyright {{ 'now'|date('Y') }} SULU</span>
6167
</div>
6268
{% endblock %}
6369
</footer>

0 commit comments

Comments
 (0)