All Projects → quickshiftin → Mage2 Ordered Assets

quickshiftin / Mage2 Ordered Assets

Licence: mit
Order assets (read: css tags) explicitly with an order attribute

Projects that are alternatives of or similar to Mage2 Ordered Assets

React Storefront
Build and deploy e-commerce progressive web apps (PWAs) in record time.
Stars: ✭ 275 (+1095.65%)
Mutual labels:  magento2
Magento2 Theme Blank Sass
SASS based version of Magento 2 Blank theme
Stars: ✭ 373 (+1521.74%)
Mutual labels:  magento2
Magento2 Exam Notes
Preparation notes for Magento 2 Certified Professional Developer exam
Stars: ✭ 588 (+2456.52%)
Mutual labels:  magento2
Magento2 Phpstorm Plugin
PHPStorm Plugin for Magento 2
Stars: ✭ 294 (+1178.26%)
Mutual labels:  magento2
Docker Magento2
Docker image for Magento 2
Stars: ✭ 336 (+1360.87%)
Mutual labels:  magento2
Magento2 Frontools
Set of front-end tools for Magento 2 based on Gulp.js
Stars: ✭ 416 (+1708.7%)
Mutual labels:  magento2
Magento2Msp
MultiSafepay plugin for Magento 2 (Deprecated) see: https://github.com/MultiSafepay/magento2
Stars: ✭ 29 (+26.09%)
Mutual labels:  magento2
Awesome Magento2
Curated list of awesome Magento 2 Extensions, Resources and other Highlights
Stars: ✭ 817 (+3452.17%)
Mutual labels:  magento2
Magento Cache Clean
A faster drop in replacement for bin/magento cache:clean with file watcher
Stars: ✭ 366 (+1491.3%)
Mutual labels:  magento2
Magento Nginx Config
Default Nginx config for Magento
Stars: ✭ 462 (+1908.7%)
Mutual labels:  magento2
React Storefront
React Storefront - PWA for eCommerce. 100% offline, platform agnostic, headless, Magento 2 supported. Always Open Source, Apache-2.0 license. Join us as contributor ([email protected]).
Stars: ✭ 292 (+1169.57%)
Mutual labels:  magento2
Magento2 Regenerate url rewrites
Magento 2 extension which add feature of regenerating a url rewrites of products/categories
Stars: ✭ 310 (+1247.83%)
Mutual labels:  magento2
Docker Magento2
🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI
Stars: ✭ 423 (+1739.13%)
Mutual labels:  magento2
Cleancheckout
A drop-in replacement for the Magento 2 checkout.
Stars: ✭ 280 (+1117.39%)
Mutual labels:  magento2
N98 Magerun2
The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.
Stars: ✭ 607 (+2539.13%)
Mutual labels:  magento2
Inventory
Magento Inventory Project (a.k.a MSI)
Stars: ✭ 270 (+1073.91%)
Mutual labels:  magento2
Magento2
Docker Image to Magento 2 local development in Mac, Linux and Windows
Stars: ✭ 412 (+1691.3%)
Mutual labels:  magento2
Ddev
DDEV-Local: a local PHP development environment system
Stars: ✭ 915 (+3878.26%)
Mutual labels:  magento2
Elasticsuite
Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
Stars: ✭ 647 (+2713.04%)
Mutual labels:  magento2
Magento2 Vagrant For Developers
Vagrant Box for Magento 2 Developers
Stars: ✭ 451 (+1860.87%)
Mutual labels:  magento2

mage2-ordered-assets

Order assets (read: css tags) explicitly with an order attribute

Magento2 has no way to order assets out of the box. This extension allows you to specify an order attribute in css tags in layout XML files and layout updates in the admin UI.

Installation

Composer

composer require quickshiftin/assetorderer

Manual

Download the repository and add it in your Magento2 installation under app/code/Quickshiftin/Assetorderer

Magento commands

Once you've installed the code via composer or download, you need to run some Magento commands:

  • bin/magento module:enable Quickshiftin_Assetorderer
  • bin/magento setup:upgrade
  • rm -rf var/cache var/di var/generation var/page_cache && bin/magento setup:di:compile

Usage

Suppose you want to add a custom CSS file, css/home.css, on your homepage. Ordinarilly you would enter this in the layout update editor

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

However, Magento most likely will place the generated link tag before the base CSS file, thus not honoring the cascade. With the extension installed you can enter the css tag with an arbitrary order attribute like so

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

Any tags without an explicit order will come as they appear normally (effectively treated like they have an order of 1).

Unit Tests

To run the unit tests, in a working installation of Magento2, with the extension enabled

  • cp vendor/quickshiftin/assetorderer/phpunit.xml dev/tests/unit
  • cd dev/tests/unit
  • php ../../../vendor/phpunit/phpunit/phpunit
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].