Skip to content
Snippets Groups Projects
Commit 2f3e072d authored by Martin Leblanc's avatar Martin Leblanc
Browse files

ISTWCMS-6993: add classes and logic to the twig files based on style.

parent 1b3e1c29
No related branches found
No related tags found
1 merge request!229Feature/istwcms 6993 m26lebla add style option for contacts profiles in manual list blocks
......@@ -6,6 +6,8 @@
configuration.contact.style ? 'block--' ~ configuration.contact.style|clean_class ~ '_contact' : '',
configuration.profile.style ? 'block--' ~ configuration.profile.style|clean_class : '',
configuration.profile.style ? 'block--' ~ configuration.profile.style|clean_class ~ '_profile' : '',
configuration.event.style ? 'block--' ~ configuration.event.style|clean_class : '',
configuration.event.style ? 'block--' ~ 'event_' ~ configuration.event.style|clean_class : '',
]|join(' ')|trim
%}
{% include '@layouts/block/block.twig' with {
......
......@@ -6,6 +6,8 @@
configuration.contact.style ? 'block--' ~ configuration.contact.style|clean_class ~ '_contact' : '',
configuration.profile.style ? 'block--' ~ configuration.profile.style|clean_class : '',
configuration.profile.style ? 'block--' ~ configuration.profile.style|clean_class ~ '_profile' : '',
configuration.event.style ? 'block--' ~ configuration.event.style|clean_class : '',
configuration.event.style ? 'block--' ~ 'event_' ~ configuration.event.style|clean_class : '',
]|join(' ')|trim
%}
{% include '@layouts/block/block.twig' with {
......
{% set show_hover = 'true' %}
{% set modifier_classes = 'teaser--conference' %}
{% include '@components/card/card.twig' with {
'content': teaser.content,
'footer': teaser.footer,
'header': teaser.header,
'image': teaser.image,
'modifier_classes': modifier_classes,
'show_hover': show_hover,
'style': style,
'tags': teaser.tags,
'type': type,
'url': teaser.url,
} %}
{% if not views %}
<div class="uw-content--grid-list__layout {{ layout_style }}">
<div class="uw-content--grid-list__layout {{ style }}">
{% endif %}
{% block content %}
......
{% set classes = type %}
{% if type == 'contact' %}
{% if type == 'contact' and not style %}
{% set classes = classes ~ ' uw-exp-col' %}
{% endif %}
......@@ -9,7 +9,7 @@
{% endif %}
<div class="{{ classes }}"{% if type == 'contact' %} id="{{ random() }}"{% endif %}>
{% if type == 'contact' and items|length > 1 %}
{% if type == 'contact' and items|length > 1 and not style %}
<div class="uw-exp-col__controls">
<button class="uw-exp-col__button uw-exp-col__button--controls" data-type="expand-all">{{ 'Expand All'|t }}</button>
<button class="uw-exp-col__button uw-exp-col__button--controls" data-type="collapse-all">{{ 'Collapse All'|t }}</button>
......@@ -18,7 +18,7 @@
{% embed '@components/content-grid-list/content-grid-list.twig' %}
{% block content %}
{% for item in items %}
{% if type == 'contact' %}
{% if type == 'contact' and not style %}
{% include '@components/contact/contact.twig' with {
'contact': item,
} %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment