Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

03 - Add a footer navigation to the website #8

Open
wants to merge 1 commit into
base: assignment/02
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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