Magento2 has no built-in mechanism for this so I decided to treat it as an opportunity to write my first Magento2 extension. The Quickshiftin\Assetorderer extension is now available on GitHub!
Once you have the extension installed you can specify an order attribute in your css XML tags.
<head>
<css src="css/page/home.css" order="100"/>
</head>
You can also use the order attribute in layout XML files such as default_head_blocks.xml
. Any css tags you don't specify an order for are treated as if they have an order of 1.
Neither your directory setup nor your code is wrong, the thing is there is no possibility to extend this configuration <page layout="..."
on the theme level for now, this possibility may be added in upcoming releases.
So if you want to set 2columns-left
layout you need to set it for all pages seperately, what I meant to say is:
For Homepage you need to dive into your admin and select the CMS page which is being displayed on the homepage and open Design tab and select your desired layout.Screenshot will be attached
For Category page you have two options to set your desired layout, one is either you dive into admin and set layout from Design tab, but in that case you need to manually set design for each and every category and the other quicker way is that you create a new catalog_category_view.xml file at below path:
\Metal
\bronze
\Magento_Catalog
\layout
catalog_category_view.xml
with the code:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body/> </page>
Remember to flush your cache, if your cache is enabled from the admin panel. And you will be getting expected output.
Similarly, you can set your desired layout for any page by targeting the xml file, for ex: catalog_product_view.xml in case of product detail page.
And if you are in dilemma, that for setting your desired layout for CMS homepage why we preferred to set up the layout from the admin panel rather then doing changes in the xml file, like we did for category and product then do let me know. Will clearify it for you.
Hope this helps you. If it does, then kindly upvote it. Thanks
Best Answer
You have to just override
customer_account_login.xml
andcustomer_account_create.xml
file to your theme customer layout.File path for make customer login page 2columns-left,
File path for make customer account create page 2columns-left,