Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,22 @@

{% set classes = [
'box-links-listing__list-item',
]
]
%}
{% for item in items %}
{#
We are checking the parent here, and then using whatever layout style is chosen
{#
We are checking the parent here, and then using whatever layout style is chosen
to set the width of the items.
#}
{% set parent = item.content['#paragraph']._referringItem.parent.parent.entity %}
{% set theme = parent.localgov_box_listing_theme.value %}

{% if theme == 'grid' %}
{% set row_size = 'lgd-row__one-half' %}
{% elseif theme == 'grid-3' %}
{% set row_size = 'lgd-row__one-third' %}
{% elseif theme == 'grid-4' %}
{% set row_size = 'lgd-row__one-quarter' %}
{% else %}
{% set row_size = 'lgd-row__full' %}
{% endif %}
Expand Down