I'm trying to add an product tab which only functions as a link href predifined in a custom block. No tab content is needed.

I tried the following:

        <referenceBlock name="product.info.details">
            <block class="Customvendor\Custommodule\Block\Product\View\Customtab" name="product.tabs.custom" template="Customvendor_Custommodule::product/view/tab.phtml"/>

With which tab.phtml contains the clickable button html and the link which it gets from the customtab block.

However the only thing it outputs is a tab without a title/name, and the content of tab.phtml outputted in the content area below the tabs when you click on it.

enter image description here

If anyone could help me further with this it would be much appreciated!

1 Answer 1


Simply create a file catalog_product_view.xml in below location


With following contents

<?xml version="1.0"?>
    <referenceContainer name="product.info.details">
        <block class="NameSpace\ModuleName\Block\Product\View\Extra"

Now you can make proper use of block and template files in the assigned location as per XML to do as required.

  • Thank you for your answer. However it does not show up, if i add group="detailed_info" to the custom block it does show up, but again without a title/name and with the tab.phtml outputted in the content area below. I added a picture as how it displays at this moment.
    – ElFietsbel
    Commented Dec 28, 2018 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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