Hallo Leute,
ich versuche aktuell das CMS-Element Template ‚element/cms-element-product-description-reviews.html.twig‘ anzupassen. Unter SW 6.4.x hat das einfach funktioniert, jetzt wird meine Templatedatei gefühlt einfach ingnoriert. Hat sich irgendwas verändert, dass ich das auf einem anderen Weg anpassen muss, oder liegen die tatsächlich verwendeten Templates jetzt woanders und ich muss eine andere Datei anpassen?
Weiß d jemand eine Lösung?
Hier mein Template:
{% sw_extends '@Storefront/storefront/element/cms-element-product-description-reviews.html.twig' %}
{% block element_product_desciption_reviews_tabs_navigation %}
{% if page.product.translated.customFields.product_customfields_garantieerklaerung %}
{% set garantieId = page.product.translated.customFields.product_customfields_garantieerklaerung %}
{% set mediaCollection = searchMedia([garnatieId], context.context) %}
{% set garantieObj = mediaCollection.get(garantieId) %}
{% set garantie = '<a href="' ~ garantieObj|sw_encode_media_url ~ '" target="_blank" style="padding-left: 10px;" title="' ~ garantieObj.fileName ~ '.' ~ garantieObj.fileExtension ~ '">' ~ garantieObj.title ~ '</a>' %}
{% endif %}
{% if page.product.translated.customFields.product_customfields_download_1 %}
{% set downloadId1 = page.product.translated.customFields.product_customfields_download_1 %}
{% set mediaCollection = searchMedia([downloadId1], context.context) %}
{% set downloadObj1 = mediaCollection.get(downloadId1) %}
{% set download1 = '<a href="' ~ downloadObj1|sw_encode_media_url ~ '" target="_blank" style="padding-left: 10px;" title="' ~ downloadObj1.fileName ~ '.' ~ downloadObj1.fileExtension ~ '">' ~ downloadObj1.title ~ '</a>' %}
{% endif %}
{% if page.product.translated.customFields.product_customfields_download_2 %}
{% set downloadId2 = page.product.translated.customFields.product_customfields_download_2 %}
{% set mediaCollection = searchMedia([downloadId2], context.context) %}
{% set downloadObj2 = mediaCollection.get(downloadId2) %}
{% set download2 = '<a href="' ~ downloadObj2|sw_encode_media_url ~ '" target="_blank" style="padding-left: 10px;" title="' ~ downloadObj2.fileName ~ '.' ~ downloadObj2.fileExtension ~ '">' ~ downloadObj2.title ~ '</a>' %}
{% endif %}
{% if page.product.translated.customFields.product_customfields_download_3 %}
{% set downloadId3 = page.product.translated.customFields.product_customfields_download_3 %}
{% set mediaCollection = searchMedia([downloadId3], context.context) %}
{% set downloadObj3 = mediaCollection.get(downloadId3) %}
{% set download3 = '<a href="' ~ downloadObj3|sw_encode_media_url ~ '" target="_blank" style="padding-left: 10px;" title="' ~ downloadObj3.fileName ~ '.' ~ downloadObj3.fileExtension ~ '">' ~ downloadObj3.title ~ '</a>' %}
{% endif %}
{% if page.product.translated.customFields.product_customfields_download_4 %}
{% set downloadId4 = page.product.translated.customFields.product_customfields_download_4 %}
{% set mediaCollection = searchMedia([downloadId4], context.context) %}
{% set downloadObj4 = mediaCollection.get(downloadId4) %}
{% set download4 = '<a href="' ~ downloadObj4|sw_encode_media_url ~ '" target="_blank" style="padding-left: 10px;" title="' ~ downloadObj4.fileName ~ '.' ~ downloadObj4.fileExtension ~ '">' ~ downloadObj4.title ~ '</a>' %}
{% endif %}
{% if page.product.translated.customFields.product_customfields_download_5 %}
{% set downloadId5 = page.product.translated.customFields.product_customfields_download_5 %}
{% set mediaCollection = searchMedia([downloadId5], context.context) %}
{% set downloadObj5 = mediaCollection.get(downloadId5) %}
{% set download5 = '<a href="' ~ downloadObj5|sw_encode_media_url ~ '" target="_blank" style="padding-left: 10px;" title="' ~ downloadObj5.fileName ~ '.' ~ downloadObj5.fileExtension ~ '">' ~ downloadObj5.title ~ '</a>' %}
{% endif %}
<div class="artikel-nav-bar">
<nav class="navbar navbar-expand-sm navbar-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon" style="background: none;">
<i class="fa-solid fa-list-ul" style="font-size: 19px;line-height: 25px;"></i>
</span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="#artikelbeschreibung">{{"productdetail.anker.artikelbeschreibung"|trans}}</a>
{% if page.product.sortedProperties|length > 0 %}
<a class="nav-item nav-link" href="#technischedetails">{{"productdetail.anker.technischedetails"|trans}}</a>
{% endif %}
{% if page.product.translated.customFields.product_customfields_lieferumfang != empty %}
<a class="nav-item nav-link" href="#lieferumfang">{{"productdetail.anker.lieferumfang"|trans}}</a>
{% endif %}
{% if garantie or download1 or download2 or download3 or download4 or download5 %}
<a class="nav-item nav-link" href="#download">{{"productdetail.anker.download"|trans}}</a>
{% endif %}
<a class="nav-item nav-link" href="#bewertungen">{{"productdetail.anker.bewertungen"|trans}}</a>
</div>
</div>
</nav>
</div>
{% endblock %}
{% block element_product_desciption_reviews_tabs_content %}
<div class="fade show active"
id="{{ descriptionTabContent }}"
aria-labelledby="{{ descriptionTabId }}">
{% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' with {
product: element.data.product
} %}
</div>
{% endblock %}