I created a custom attribute dispname and I would like to add it under the name on the product page. I tried to change the xml file catalog_product_view.xml but it doesn't work. I can add it in the tab "More Information" but not under the name of the product.

enter image description here

Can you help me please?


<block class="Magento\Catalog\Block\Product\View\Description" name="specification_tab" template="product/view/attribute.phtml">
        <argument name="at_call" xsi:type="string">getSpecification</argument>
        <argument name="at_code" xsi:type="string">specification</argument>
        <argument name="css_class" xsi:type="string">specification</argument>
        <argument name="at_label" xsi:type="string">none</argument>
        <argument name="title" translate="true" xsi:type="string">Specification</argument>

Please use this code inside catalog_product_view.xml file under tag <referenceContainer name="content">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.