Skip to content

Commit

Permalink
03 - Add a footer navigation to the website
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes authored and niklasnatter committed Oct 21, 2020
1 parent 197981d commit afbf342
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config/webspaces/example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
<title lang="de">Hauptnavigation</title>
</meta>
</context>
<context key="footer">
<meta>
<title lang="en">Footer Navigation</title>
<title lang="de">Footernavigation</title>
</meta>
</context>
</contexts>
</navigation>

Expand Down
8 changes: 7 additions & 1 deletion templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@
<footer class="footer mt-auto py-3">
{% block footer %}
<div class="container">
<span class="text-muted">Copyright {{ 'now'|date('Y') }} SULU</span>
{% for item in sulu_navigation_root_flat('footer') %}
<a href="{{ sulu_content_path(item.url) }}">{{ item.title }}</a>

{% if not loop.last %}&nbsp;|&nbsp;{% endif %}
{% endfor %}

<span class="text-muted float-right">Copyright {{ 'now'|date('Y') }} SULU</span>
</div>
{% endblock %}
</footer>
Expand Down

0 comments on commit afbf342

Please sign in to comment.