cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Category Sidebar to Homepage

Adding Category Sidebar to Homepage

I am building a site using the BeamStore theme. It comes with a category tree sidebar, which is located in app/design/frontend/NineThemes/BeamStore/default/Magento_Catalog/templates/navigation/left.phtml

 

How do I add the contents of this file to my homepage? 

2 REPLIES

Re: Adding Category Sidebar to Homepage

Anyone?

 

I have a sidebar template file located at:

app/design/frontend/NineThemes/BeamStore/default/Magento_Catalog/templates/navigation/left.phtml

and I added the code below to: 

app/design/frontend/NineThemes/BeamStore/default/Magento_Catalog/layout/default.xml
<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" layout="2columns-left">
    <body>
        <referenceContainer name="header-wrapper">
            <container name="compare-link-wrapper" label="Compare Link Wrapper" as="compare-link-wrapper" after="top.search" htmlTag="ul" htmlClass="compare wrapper">
                <block class="Magento\Framework\View\Element\Template" name="catalog.compare.link" before="-" template="Magento_Catalog::product/compare/link.phtml">
                    <arguments>
                        <argument name="jsLayout" xsi:type="array">
                            <item name="components" xsi:type="array">
                                <item name="compareProducts" xsi:type="array">
                                    <item name="component" xsi:type="string">Magento_Catalog/js/view/compare-products</item>
                                </item>
                            </item>
                        </argument>
                    </arguments>
                </block>
            </container>
        </referenceContainer>
        <referenceContainer name="sidebar.main">
            <block class="Magento\Catalog\Block\Navigation" name="catalog.leftnav" before="-" template="navigation/left.phtml"/>
        </referenceContainer>
    </body>
</page>

What am i doing wrong? I want the sidebar to show up on the homepage but it isn;t showing up, even after I clear the cache etc. Am I adding the block to the wrong file?

Re: Adding Category Sidebar to Homepage

I have also tried adding the code above to 

app/design/frontend/NineThemes/BeamStore/default/Magento_Catalog/view/frontend/layout/default.xml

with no luck.