I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.
I am new to Magento unfamiliarized with the complexity of overwriting the parent theme's layout from the child theme's default.xml file I have placed in app/design/frontend/myCompany/myTheme/Magento_Theme/layout/default.xml
.
The layout of the homepage should be something like this:
Doing Content > Pages > Design > Layout > 2 columns with left bar
just added Compare Products and My Wish List to the left sidebar. I need the categories there. Also, currently, the defaukt.xml file looks like this:
<block name="require.js" class="Magento\Framework\View\Element\Template" template="Magento_Theme::page/js/require_js.phtml" />
<referenceContainer name="after.body.start">
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>
<block class="Magento\Translation\Block\Html\Head\Config" name="translate-config"/>
<block class="Magento\Translation\Block\Js" name="translate" template="Magento_Translation::translate.phtml"/>
<block class="Magento\Framework\View\Element\Js\Cookie" name="js_cookies" template="Magento_Theme::js/cookie.phtml"/>
<block class="Magento\Theme\Block\Html\Notices" name="global_notices" template="html/notices.phtml"/>
</referenceContainer>
<referenceBlock name="top.links">
<block class="Magento\Theme\Block\Html\Header" name="header" as="header" before="-">
<arguments>
<argument name="show_part" xsi:type="string">welcome</argument>
</arguments>
</block>
</referenceBlock>
<referenceContainer name="main.content">
<block class="Magento\Framework\View\Element\Template" name="skip_to_content.target" before="-" template="Magento_Theme::html/skiptarget.phtml">
<arguments>
<argument name="target_id" xsi:type="string">contentarea</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="header.container" htmlId="siteHeader" htmlClass="panel wrapper fullwidth">
<container name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="header content">
<block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
<arguments>
<argument name="logo_file" xsi:type="string">images/logo.png</argument>
<argument name="logo_img_width" xsi:type="number">128</argument>
<argument name="logo_img_height" xsi:type="number">45</argument>
</arguments>
</block>
</container>
</referenceContainer>
<referenceContainer name="page.top">
<block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::html/sections.phtml">
<arguments>
<argument name="group_name" xsi:type="string">navigation-sections</argument>
<argument name="group_css" xsi:type="string">nav-sections</argument>
</arguments>
<block class="Magento\Framework\View\Element\Template" name="store.menu" group="navigation-sections" template="Magento_Theme::html/container.phtml">
<block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="html/topmenu.phtml" ttl="3600" before="-"/>
</block>
<block class="Magento\Framework\View\Element\Template" name="store.settings" group="navigation-sections" template="Magento_Theme::html/container.phtml">
<arguments>
<argument name="title" translate="true" xsi:type="string">Settings</argument>
</arguments>
<block class="Magento\Store\Block\Switcher" name="store.settings.language" template="switch/languages.phtml">
<arguments>
<argument name="id_modifier" xsi:type="string">nav</argument>
</arguments>
</block>
<block class="Magento\Directory\Block\Currency" name="store.settings.currency" template="currency.phtml">
<arguments>
<argument name="id_modifier" xsi:type="string">nav</argument>
</arguments>
</block>
</block>
</block>
<container name="top.container" as="topContainer" label="After Page Header Top" htmlTag="div" htmlClass="top-container"/>
<block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</referenceContainer>
<referenceContainer name="columns.top">
<block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="html/title.phtml"/>
<container name="page.messages" htmlTag="div" htmlClass="page messages">
<block class="Magento\Framework\View\Element\Template" name="ajax.message.placeholder" template="Magento_Theme::html/messages.phtml"/>
<block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml"/>
</container>
</referenceContainer>
<referenceContainer name="main">
<container name="content.top" label="Main Content Top">
</container>
<container name="content" label="Main Content Area">
</container>
<container name="content.aside" label="Main Content Aside">
</container>
<container name="content.bottom" label="Main Content Bottom"/>
</referenceContainer>
<referenceContainer name="page.bottom.container">
<container name="page.bottom" label="Before Page Footer" htmlTag="div" htmlClass="content"/>
</referenceContainer>
<referenceContainer name="footer-container">
<container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer content">
<block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="switch/stores.phtml"/>
<block class="Magento\Framework\View\Element\Html\Links" name="footer_links">
<arguments>
<argument name="css_class" xsi:type="string">footer links</argument>
</arguments>
</block>
<block class="Magento\Theme\Block\Html\Footer" name="copyright" template="html/copyright.phtml"/>
<block class="Magento\Framework\View\Element\Template" name="report.bugs" template="Magento_Theme::html/bugreport.phtml" />
</container>
</referenceContainer>
<referenceContainer name="before.body.end">
<block class="Magento\Theme\Block\Html\Footer" name="absolute_footer" template="html/absolute_footer.phtml" />
</referenceContainer>
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\FormKey" name="formkey"/>
</referenceContainer>
What would be the most simple structure for the default.xml
file that would output the 2 columns layout above? Thank you!