# Produkttitel / Produktname um Variantenoption ergänzen

**URL:** <https://forum.shopware.com/t/produkttitel-produktname-um-variantenoption-ergaenzen/104490>\
**Category:** Themes & Design\
**Created:** [8. Juli 2024 um 13:00 UTC](https://forum.shopware.com/t/produkttitel-produktname-um-variantenoption-ergaenzen/104490 "2024-07-08T13:00:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dennis\_S](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@Dennis\_S](https://forum.shopware.com/u/Dennis_S)\
**Post date:** [8. Juli 2024 um 13:00 UTC](https://forum.shopware.com/t/produkttitel-produktname-um-variantenoption-ergaenzen/104490/1 "2024-07-08T13:00:07Z")

</div>

Hallo zusammen,

wir haben seit heute Shopware 6.6.4 im Einsatz.  
Zuvor hatten wir den Produkttitel um die Variantenoption ergänzt.  
Das ganze habe ich in `@Storefront/storefront/page/product-detail/headline.html.twig` so umgesetzt:

```auto
<h1 class="product-detail-name"
	itemprop="name">
	{{ page.product.translated.name }} {% if page.product.variation %}- {% for variation in page.product.variation %} {{ variation.option }} {% if page.product.variation|last != variation %}{{ " | " }} {% endif %} {% endfor %} {% endif %}
</h1>

```

Heute ist mir aufgefallen das die Variantenoption nicht mehr im Produkttitel erscheint.

Was mich jetzt wundert ist, dass sich der Block und das Verzeichnis in dem der Produkttitel stand laut Shopware-Tools auf `<!-- BLOCK BEGIN element_product_name_inner (vendor/shopware/storefront/Resources/views/storefront/element/cms-element-product-name.html.twig) -->` geändert hat.

 ![product_name](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/2/223e0d07a995a81fed1ae62a3abce40da580e99d.png)

Ich stelle mir nun die Frage, seit wann es da eine Änderung gab und wie ich die Variantenoption in den Produkttitel bekomme, denn in der  
`\vendor\shopware\storefront\Resources\views\storefront\element\cms-element-product-name.html.twig`  
gibt es die Variable `{{ page.product.translated.name }}` nicht mehr.

---

<div class="post-metadata">

**Author:** ![SarahB](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@SarahB](https://forum.shopware.com/u/SarahB)\
**Post date:** [20. Juli 2024 um 07:01 UTC](https://forum.shopware.com/t/produkttitel-produktname-um-variantenoption-ergaenzen/104490/2 "2024-07-20T07:01:25Z")

</div>

Ich bin absolut kein Profi.  
Habe es duchr probieren wie folgt umgesetzt.

```auto
 {% block element_product_name_inner %}
                {% if config.content.isStatic %}
                    <span itemprop="name">
                        {{ element.data.content|raw }}
                    </span>
                {% else %}
                    <h1 class="product-detail-name" itemprop="name">
                        {{ element.data.content|raw }} {% if page.product.variation %}- {% for variation in page.product.variation %} {{ variation.option }} {% if page.product.variation|last != variation %}{{ " | " }} {% endif %} {% endfor %} {% endif %}
                    </h1>
                {% endif %}
            {% endblock %}

```
