I want to create a custom template for Magento ver.2.0.7 and am trying to find the location of the main HTML file. i.e. The file that is loaded when I go to my Magento URL.
Can I extend this HTML file to add Bootstrap elements?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI want to create a custom template for Magento ver.2.0.7 and am trying to find the location of the main HTML file. i.e. The file that is loaded when I go to my Magento URL.
Can I extend this HTML file to add Bootstrap elements?
Magento does not have a main HTML. It has an index.php
that is called when you enter in your store. This php file will "build" the layout of your store, load images, CSS, javascript files, insert blocks, etc; which means that the final HTML that you see in your home page is not a single file.
The best way to change your layout is creating a custom theme. You should not modify Magento files.
I didn't work with Magento 2 yet, but this link explains how to create your theme. And yes, you can use bootstrap elements.
Not all layout customizations can be performed by extending existing layouts. If the amount of customizations is large, you can use the overriding function for the needed layout file. This means that the new file that you place in the theme will be used instead of the parent theme layout file of base layout file.
In this article, page layouts, page configurations, and generic layouts are referred to as layout files, as the mechanism of overriding is similar for all of them.
Layout files with instructions that override the default or parent theme files are referred to as overriding layout files.
http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-override.html