migrate product detail templates
This commit is contained in:
parent
86559e7b92
commit
3a237af9c9
11 changed files with 142 additions and 200 deletions
|
|
@ -0,0 +1,29 @@
|
|||
{% sw_extends '@Storefront/storefront/block/cms-block-gallery-buybox.html.twig' %}
|
||||
|
||||
{% block block_gallery_buybox_column_left_inner %}
|
||||
{{ parent() }}
|
||||
|
||||
{% if page.product.extensions.awardMedia|length %}
|
||||
<div class="awards">
|
||||
{% for awardMedia in page.product.extensions.awardMedia.all() %}
|
||||
<a href="https://www.wg-schriesheim.de/auszeichnungen"
|
||||
title="{{ name }}" target="_blank">
|
||||
{% sw_thumbnails 'awardMedia' with {
|
||||
media: awardMedia|first,
|
||||
sizes: {
|
||||
'xs': '501px',
|
||||
'sm': '315px',
|
||||
'md': '427px',
|
||||
'lg': '333px',
|
||||
'xl': '284px',
|
||||
'default': '100px'
|
||||
},
|
||||
attributes: {
|
||||
'title': awardMedia|first.title
|
||||
}
|
||||
} %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
|
||||
|
||||
{% block buy_widget_rich_snippets %}
|
||||
{% block page_product_detail_name %}
|
||||
<h1 class="product-detail-name"
|
||||
{% if not feature('JSON_LD_DATA') %}itemprop="name"{% endif %}>
|
||||
{% if product.customFields.custom_wein_jahrgang %}<span class="year">{{ product.customFields.custom_wein_jahrgang }}er</span>{% endif %}
|
||||
<span class="site">{{ product.extensions.bwegProperties.get('4d005d04a2924cc4b59612875aee757c') }}</span>
|
||||
{{ product.translated.name }}
|
||||
<span class="qty_taste">{{ product.extensions.bwegProperties.get('840da18f18184040ac2c34e9a13abd83') }} {{ product.extensions.bwegProperties.get('087598bcbf044684b57fa108f0385128') }}</span>
|
||||
{% if product.customFields.custom_wein_addendum %}
|
||||
<span class="addendum">{{ product.customFields.custom_wein_addendum }}</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{# Description and properties: replace the order-number block (last child inside the buy column) #}
|
||||
{% block buy_widget_ordernumber_container %}
|
||||
{% block page_product_detail_buy_description %}
|
||||
<div class="h3 product-detail-description-title">
|
||||
{{ "detail.miscTitle"|trans|sw_sanitize }}
|
||||
</div>
|
||||
<div class="product-detail-description-text"
|
||||
{% if not feature('JSON_LD_DATA') %}itemprop="description"{% endif %}>
|
||||
{{ product.translated.description|raw }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% sw_include '@Wgsh/storefront/page/product-detail/customfields.html.twig' with { 'product': product } %}
|
||||
{% endblock %}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
{% sw_extends '@Storefront/storefront/element/cms-element-product-description-reviews.html.twig' %}
|
||||
|
||||
{% block element_product_description_reviews_tabs_navigation_description %}{% endblock %}
|
||||
|
||||
{% block element_product_description_reviews_tabs_content_description %}{% endblock %}
|
||||
|
||||
{% block element_product_description_reviews_tabs_navigation_review %}
|
||||
{% if config('core.listing.showReview') %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active product-detail-tab-navigation-link review-tab"
|
||||
id="{{ reviewTabId }}"
|
||||
data-bs-toggle="tab"
|
||||
data-off-canvas-tabs="true"
|
||||
href="{{ reviewTabHref }}"
|
||||
role="tab"
|
||||
aria-controls="{{ reviewTabContent }}"
|
||||
aria-selected="true">
|
||||
{{ "detail.tabsReview"|trans|sw_sanitize }}
|
||||
<span class="product-detail-tab-navigation-icon">
|
||||
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block element_product_description_reviews_tabs_content_review %}
|
||||
{% if config('core.listing.showReview') %}
|
||||
<div class="tab-pane fade show active"
|
||||
id="{{ reviewTabContent }}"
|
||||
role="tabpanel"
|
||||
aria-labelledby="{{ reviewTabId }}">
|
||||
{% sw_include '@Storefront/storefront/component/review/review.html.twig' with {
|
||||
reviews: element.data.reviews,
|
||||
product: element.data.product
|
||||
} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{% sw_extends '@Storefront/storefront/element/cms-element-product-name.html.twig' %}
|
||||
|
||||
{% block element_product_name %}
|
||||
{% if cmsPage is not defined or cmsPage.type != 'product_detail' %}
|
||||
{{ parent() }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{% sw_extends '@Storefront/storefront/page/content/product-detail.html.twig' %}
|
||||
|
||||
{% block cms_breadcrumb %}{% endblock %}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
|
||||
|
||||
{% block page_product_detail_price_unit %}
|
||||
<div class="product-detail-price-unit">
|
||||
{% block page_product_detail_price_unit_label %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_product_detail_price_unit_content %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% if price.referencePrice is not null %}
|
||||
{% block page_product_detail_price_unit_reference_content %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
<div class="product-detail-tax-container">
|
||||
{% if context.taxState == "gross" %}
|
||||
{% set taxText = "general.grossTaxInformation"|trans|sw_sanitize %}
|
||||
{% else %}
|
||||
{% set taxText = "general.netTaxInformation"|trans|sw_sanitize %}
|
||||
{% endif %}
|
||||
|
||||
<p class="product-detail-tax">
|
||||
{% block page_product_detail_tax_link %}
|
||||
<a class="product-detail-tax-link"
|
||||
href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"
|
||||
title="{{ taxText }}"
|
||||
{{ dataBsToggleAttr }}="modal"
|
||||
data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
|
||||
{{ taxText }}
|
||||
</a>
|
||||
{% endblock %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
|
||||
|
||||
{% block page_product_detail_tax %}{% endblock %}
|
||||
{% block page_product_detail_ordernumber_container %}{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -6,86 +6,86 @@
|
|||
<table class="table table-striped product-detail-properties-table">
|
||||
<tbody>
|
||||
{# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
|
||||
{# {% for customFieldKey, customFieldValue in page.product.translated.customFields %}#}
|
||||
{# {% for customFieldKey, customFieldValue in product.translated.customFields %}#}
|
||||
{% block page_product_detail_customfields_table_row %}
|
||||
{% if page.product.extensions.bwegProperties.get('840da18f18184040ac2c34e9a13abd83') is not empty %}
|
||||
{% if product.extensions.bwegProperties.get('840da18f18184040ac2c34e9a13abd83') is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">Produktlinie:</th>
|
||||
<td class="properties-value">{{ page.product.extensions.bwegProperties.get('840da18f18184040ac2c34e9a13abd83') }}</td>
|
||||
<td class="properties-value">{{ product.extensions.bwegProperties.get('840da18f18184040ac2c34e9a13abd83') }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_jahrgang|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_jahrgang|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_jahrgang"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_jahrgang|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_jahrgang|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_alkohol|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_alkohol|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_alkohol"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_alkohol|trans }} %</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_alkohol|trans }} %</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_saeure|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_saeure|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_saeure"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_saeure|trans }} g/l</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_saeure|trans }} g/l</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_restzucker|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_restzucker|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_restzucker"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_restzucker|trans }} g/l</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_restzucker|trans }} g/l</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_allergene|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_allergene|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_allergene"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_allergene|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_allergene|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.extensions.bwegProperties.get('137f0e25929347c2bf26fc50196a3699') is not empty %}
|
||||
{% if product.extensions.bwegProperties.get('137f0e25929347c2bf26fc50196a3699') is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">Rebsorte:</th>
|
||||
<td class="properties-value">{{ page.product.extensions.bwegProperties.get('137f0e25929347c2bf26fc50196a3699') }}</td>
|
||||
<td class="properties-value">{{ product.extensions.bwegProperties.get('137f0e25929347c2bf26fc50196a3699') }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.extensions.bwegProperties.get('c19533e52b634c7693e9b27c3c1ab6ab') is not empty %}
|
||||
{% if product.extensions.bwegProperties.get('c19533e52b634c7693e9b27c3c1ab6ab') is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">Auszeichnungen:</th>
|
||||
<td class="properties-value">
|
||||
{{ page.product.extensions.bwegProperties.get('c19533e52b634c7693e9b27c3c1ab6ab') }}
|
||||
{{ product.extensions.bwegProperties.get('c19533e52b634c7693e9b27c3c1ab6ab') }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_anbauregion|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_anbauregion|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_anbauregion"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_anbauregion|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_anbauregion|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_erzeuger|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_erzeuger|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_erzeuger"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_erzeuger|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_erzeuger|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_ursprungsland|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_ursprungsland|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_ursprungsland"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_ursprungsland|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_ursprungsland|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_losnummer|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_losnummer|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_losnummer"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_losnummer|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_losnummer|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_wein_apno|trans is not empty %}
|
||||
{% if product.translated.customFields.custom_wein_apno|trans is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "customFields.custom_wein_apno"|trans|sw_sanitize }}:</th>
|
||||
<td class="properties-value">{{ page.product.translated.customFields.custom_wein_apno|trans }}</td>
|
||||
<td class="properties-value">{{ product.translated.customFields.custom_wein_apno|trans }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{#{% if customFieldKey != 'custom_wein_misc' %}
|
||||
|
|
@ -100,21 +100,21 @@
|
|||
{% endif %}#}
|
||||
{% endblock %}
|
||||
{# {% endfor %}#}
|
||||
{% if page.product.productNumber %}
|
||||
{% if product.productNumber %}
|
||||
<tr class="properties-row">
|
||||
{% block page_product_detail_ordernumber_label %}
|
||||
<th class="properties-label">{{ "detail.productNumberLabel"|trans|sw_sanitize }}</th>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_product_detail_ordernumber %}
|
||||
<td class="properties-value"><meta itemprop="productID" content="{{ page.product.id }}"/> <span itemprop="sku">{{ page.product.productNumber }}</span></td>
|
||||
<td class="properties-value"><meta itemprop="productID" content="{{ product.id }}"/> <span itemprop="sku">{{ product.productNumber }}</span></td>
|
||||
{% endblock %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if page.product.translated.customFields.custom_expertise_pdf is not empty %}
|
||||
{% if product.translated.customFields.custom_expertise_pdf is not empty %}
|
||||
<tr class="properties-row">
|
||||
<th class="properties-label">{{ "detail.expertiseLabel"|trans|sw_sanitize }}</th>
|
||||
<td class="properties-value"><a href="https://dev.bergstraesserwinzer.de/files/bweg_2021/Downloads/Expertisen{% if page.product.translated.customFields.custom_expertise_pdf starts with '/' %}{{ page.product.translated.customFields.custom_expertise_pdf }}{% else %}/{{ page.product.translated.customFields.custom_expertise_pdf }}{% endif %}">» Downloaden</a></td>
|
||||
<td class="properties-value"><a href="https://dev.bergstraesserwinzer.de/files/bweg_2021/Downloads/Expertisen{% if product.translated.customFields.custom_expertise_pdf starts with '/' %}{{ product.translated.customFields.custom_expertise_pdf }}{% else %}/{{ product.translated.customFields.custom_expertise_pdf }}{% endif %}">» Downloaden</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
{% sw_extends '@Storefront/storefront/page/product-detail/description.html.twig' %}
|
||||
|
||||
{% block page_product_detail_description_title %}{% endblock %}
|
||||
|
||||
{% block page_product_detail_description_content_text %}
|
||||
<div class="product-detail-description-text">
|
||||
{{ page.product.translated.customFields.custom_wein_misc|raw }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_product_detail_description_content_properties %}{% endblock %}
|
||||
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
|
||||
|
||||
{% block base_breadcrumb %}{% endblock %}
|
||||
{% block page_product_detail_headline %}{% endblock %}
|
||||
|
||||
{% block page_product_detail_media %}
|
||||
<div class="col-lg-7 product-detail-media">
|
||||
{% if page.product.media %}
|
||||
{% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
|
||||
'mediaItems': mediaItems,
|
||||
'zoom': false,
|
||||
'zoomModal': true,
|
||||
'displayMode': 'contain',
|
||||
'gutter': 5,
|
||||
'minHeight': '430px',
|
||||
'navigationArrows': 'inside',
|
||||
'navigationDots': 'inside',
|
||||
'galleryPosition': 'left',
|
||||
'isProduct': true,
|
||||
'fallbackImageTitle': page.product.translated.name,
|
||||
'startIndexThumbnails': page.product.cover.position + 1,
|
||||
'startIndexSlider': page.product.cover.position + 1
|
||||
} %}
|
||||
{% endif %}
|
||||
{% if page.product.extensions.awardMedia|length %}
|
||||
<div class="awards">
|
||||
{% for awardMedia in page.product.extensions.awardMedia.all() %}
|
||||
<a href="https://www.wg-schriesheim.de/auszeichnungen"
|
||||
title="{{ name }}" target="_blank">
|
||||
{% sw_thumbnails 'awardMedia' with {
|
||||
media: awardMedia|first,
|
||||
sizes: {
|
||||
'xs': '501px',
|
||||
'sm': '315px',
|
||||
'md': '427px',
|
||||
'lg': '333px',
|
||||
'xl': '284px',
|
||||
'default': '100px'
|
||||
},
|
||||
attributes: {
|
||||
'title': awardMedia|first.title
|
||||
}
|
||||
} %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_product_detail_buy %}
|
||||
<div class="col-lg-5 product-detail-buy">
|
||||
{% block page_product_detail_name %}
|
||||
<h1 class="product-detail-name"
|
||||
itemprop="name">
|
||||
{% if page.product.customFields.custom_wein_jahrgang %}<span class="year">{{ page.product.customFields.custom_wein_jahrgang }}er</span>{% endif %}
|
||||
<span class="site">{{ page.product.extensions.bwegProperties.get('4d005d04a2924cc4b59612875aee757c') }}</span>
|
||||
{{ page.product.translated.name }}
|
||||
<span class="qty_taste">{#{{ page.product.extensions.bwegProperties.get('3897a8e7eb47405f941525a2c21395c8') }}#}{{ page.product.extensions.bwegProperties.get('840da18f18184040ac2c34e9a13abd83') }} {{ page.product.extensions.bwegProperties.get('087598bcbf044684b57fa108f0385128') }}</span>
|
||||
{% if page.product.customFields.custom_wein_addendum %}
|
||||
<span class="addendum">{{ page.product.customFields.custom_wein_addendum }}</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
{% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
|
||||
{% block page_product_detail_buy_description %}
|
||||
<div class="h3 product-detail-description-title">
|
||||
{# {{ "detail.characterTitle"|trans|sw_sanitize }} #}
|
||||
{{ "detail.miscTitle"|trans|sw_sanitize }}
|
||||
</div>
|
||||
<div class="product-detail-description-text"
|
||||
itemprop="description">
|
||||
{{ page.product.translated.description|raw }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% sw_include '@Bweg/storefront/page/product-detail/customfields.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{% sw_extends '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
|
||||
|
||||
{% block page_product_detail_tabs_navigation_description %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link"
|
||||
id="description-tab"
|
||||
{{ dataBsToggleAttr }}="tab"
|
||||
data-offcanvas-tabs="true"
|
||||
href="#description-tab-pane"
|
||||
role="tab"
|
||||
aria-controls="description-tab-pane"
|
||||
aria-selected="true">
|
||||
<span class="product-detail-tab-navigation-icon">
|
||||
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
|
||||
</span>
|
||||
{% if page.product.translated.description|length > 0 %}
|
||||
<span class="product-detail-tab-preview">
|
||||
{{ page.product.translated.description|raw|striptags|sw_sanitize|u.truncate(125, '…') }}
|
||||
|
||||
{# truncate always cuts down the length to 125 characters.
|
||||
So it will only shorten the string if it exceeds 125 chars.
|
||||
Therefor, only show the button when the length of the text is
|
||||
greater or equal then 126 characters. #}
|
||||
{% if page.product.translated.description|length >= 126 %}
|
||||
<span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue