Ordering assets in Magento 2

Posted in Magento on 15 August 2017

This one will come in useful until Magento 2 sorts itself out.

For some reason, Magento 2 has no way to order assets out of the box. There is now an extension which allows you to set an order attribute in the CSS tags of the layout XML files and layout updates in Admin Panel.

Github: Mage2 Ordered Assets by Quickshiftin

Example

Before

<head>
   <css src="css/app.css" />
</head>

After

<head>
   <css src="css/app.css" order="100" />
</head>

Related Magento Posts

January 2024

Using Magento to get small businesses online

For small businesses aiming to establish a formidable online presence and drive sales, Magento emerges as a powerful e-commerce platform offering a suite of features... Continue reading

October 2023

Magento database structure

The database structure of Magento is designed to store and manage various aspects of an e-commerce website, including products, orders, customers, and more. Understanding the... Continue reading

August 2023

Accessibility in ecommerce websites

In the digital age, where online shopping has become an integral part of our lives, ecommerce websites hold the key to business success. Amidst the... Continue reading

More Magento Posts