Skip to content

Commit

Permalink
EWPP-1875: Make footer templates more extendable.
Browse files Browse the repository at this point in the history
  • Loading branch information
nagyad authored and 22Alexandra committed Mar 24, 2022
1 parent a8803c1 commit c98e994
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 67 deletions.
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

0 comments on commit c98e994

Please sign in to comment.