0

Hi there I want to add my custom section/tab on the right section of all the categories for getting a clear idea I am attaching this image Snap of frontend

This is the men section I want to add the same custom tab on all of the sections!!

0

add custom section/tab through custom theme:

add below code in catalog_category_view.xml

 <referenceContainer name="div.sidebar.additional">
        <block class="Magento\Framework\View\Element\Template" name="custom.tab" template="Magento_Catalog::customtab.phtml" after="-"/>
    </referenceContainer>

create customtab.phtml file and add your custom code.

add custom section/tab through module:

override catalog_category_view.xml and add below code

 <referenceContainer name="div.sidebar.additional">
        <block class="Magento\Framework\View\Element\Template" name="custom.tab" template="vendor_module::customtab.phtml" after="-"/>
    </referenceContainer>

create customtab.phtml file and add your custom code.

  • Hi Kinjal It works but it shifts the whole section to the right side of the page any idea about it?? – Gee Emm Jan 4 at 16:35
  • Solved it too Thanks for the answer I am accepting your answer Thanks – Gee Emm Jan 4 at 17:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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