I want to create a new theme in magento and customize the html and css as I need.
I successfully created a new theme as per magento dev docs.
Now I need to customize, so that if someone gives me a design I should be able to convert it to a Magento theme.
I tried to start customizing the navigation bar. For navigation, the template file is topmenu.phtml
located in root/vendor/magento/module-theme
so I created a new folder Magento_Theme
in my theme's directory app/design/frontend/<V>/<T>/Magento_Theme
and in the templates/html
directory I copied and pasted topmenu.phtml
.
But to my amusement, I found nothing there, everything is getting from block, even the html:
<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>
<?php $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit) ?>
<nav class="navigation" data-action="navigation">
<ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
<?php /* @escapeNotVerified */ echo $_menu; ?>
<?php /* @escapeNotVerified */ echo $block->getChildHtml(); ?>
</ul>
</nav>
I am stuck here - how to customize it?
Can anyone who has experience in developing Magento 2.1 themes guide me how to customize pages? I just started with navigation and got stuck here. I am only able to change the CSS, not the HTML.
I want to change sidebars, catalog products, navigation and all.
Any guidance is appreciated. Please.