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

EWPP-1875: Make footer templates more extendable. #1064

Merged
merged 1 commit into from
Apr 4, 2022
Merged
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
58 changes: 29 additions & 29 deletions templates/navigation/oe-corporate-blocks-ec-footer--core.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@
*/
#}

{% set _row = [
[
{
'title': {
'link': {
'label': corporate_footer.corporate_site_link.label,
'path': corporate_footer.corporate_site_link.href,
},
},
'description': site_owner ? 'This site is managed by the @name'|t({'@name': site_owner}),
{% set _first_column = [
{
'title': {
'link': {
'label': corporate_footer.corporate_site_link.label,
'path': corporate_footer.corporate_site_link.href,
},
],
[
{
'content_before': 'More information on:'|t,
'links': ecl_footer_links(corporate_footer.class_navigation),
'links_columns': true,
'section_with_separator': true,
},
{
'links': ecl_footer_links(corporate_footer.service_navigation),
},
{
'links': ecl_footer_links(corporate_footer.legal_navigation),
},
]
},
'description': site_owner ? 'This site is managed by the @name'|t({'@name': site_owner}),
},
] %}
{% set _second_column = [
{
'content_before': 'More information on:'|t,
'links': ecl_footer_links(corporate_footer.class_navigation),
'links_columns': true,
'section_with_separator': true,
},
{
'links': ecl_footer_links(corporate_footer.service_navigation),
},
{
'links': ecl_footer_links(corporate_footer.legal_navigation),
},
]
%}
%}

{% include '@ecl-twig/footer-core' with {
'rows': [_row],
} %}
{% block content %}
{% include '@ecl-twig/footer-core' with {
'rows': [[_first_column, _second_column]],
} %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -57,47 +57,48 @@
}]) %}
{% endif %}

{% block content %}
{# Populate the top row with the site identity and the custom links. #}
{% set _top_row = [
[
{
'title': {
'link': {
'label': site_specific_footer.site_identity,
'path': url('<front>'),
}
},
'description': site_owner ? 'This site is managed by the @name'|t({'@name': site_owner}),
{# Populate the top row with the site identity and the custom links. #}
{% set _top_row = [
[
{
'title': {
'link': {
'label': site_specific_footer.site_identity,
'path': url('<front>'),
}
],
_top_left_column,
_top_right_column
] %}
},
'description': site_owner ? 'This site is managed by the @name'|t({'@name': site_owner}),
}
],
_top_left_column,
_top_right_column
] %}

{# Populate the bottom row with the corporate links. #}
{% set _bottom_row = [
[
{
'title': {
'link': {
'label': corporate_footer.corporate_site_link.label,
'path': corporate_footer.corporate_site_link.href,
},
{# Populate the bottom row with the corporate links. #}
{% set _bottom_row = [
[
{
'title': {
'link': {
'label': corporate_footer.corporate_site_link.label,
'path': corporate_footer.corporate_site_link.href,
},
}
],
[
{
'links': ecl_footer_links(corporate_footer.service_navigation),
}
],
[
{
'links': ecl_footer_links(corporate_footer.legal_navigation),
}
],
] %}
},
}
],
[
{
'links': corporate_footer.service_navigation ? ecl_footer_links(corporate_footer.service_navigation) : '',
}
],
[
{
'links': corporate_footer.legal_navigation ? ecl_footer_links(corporate_footer.legal_navigation) : '',
}
],
] %}

{% block content %}
{% include '@ecl-twig/footer-standardised' with {
'rows': [ _top_row, _bottom_row],
} %}
Expand Down