{"id":18311092,"url":"https://github.com/quickshiftin/mage2-ordered-assets","last_synced_at":"2025-04-05T18:31:47.692Z","repository":{"id":62532217,"uuid":"57461468","full_name":"quickshiftin/mage2-ordered-assets","owner":"quickshiftin","description":"Order assets (read: css tags) explicitly with an order attribute","archived":false,"fork":false,"pushed_at":"2019-08-07T13:10:09.000Z","size":34,"stargazers_count":26,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T08:35:00.622Z","etag":null,"topics":["css","magento2","order"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quickshiftin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-30T20:55:19.000Z","updated_at":"2021-11-16T08:23:44.000Z","dependencies_parsed_at":"2022-11-02T14:32:44.255Z","dependency_job_id":null,"html_url":"https://github.com/quickshiftin/mage2-ordered-assets","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickshiftin%2Fmage2-ordered-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickshiftin%2Fmage2-ordered-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickshiftin%2Fmage2-ordered-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quickshiftin%2Fmage2-ordered-assets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quickshiftin","download_url":"https://codeload.github.com/quickshiftin/mage2-ordered-assets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247383896,"owners_count":20930367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","magento2","order"],"created_at":"2024-11-05T16:16:25.204Z","updated_at":"2025-04-05T18:31:47.218Z","avatar_url":"https://github.com/quickshiftin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mage2-ordered-assets\nOrder assets (read: css tags) explicitly with an order attribute\n\nMagento2 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.\n\n## Installation\n### Composer\n`composer require quickshiftin/assetorderer`\n\n### Manual\nDownload the repository and add it in your Magento2 installation under **app/code/Quickshiftin/Assetorderer**\n\n### Magento commands\nOnce you've installed the code via composer or download, you need to run some Magento commands:\n\n* `bin/magento module:enable Quickshiftin_Assetorderer`\n* `bin/magento setup:upgrade`\n* `rm -rf var/cache var/di var/generation var/page_cache \u0026\u0026 bin/magento setup:di:compile`\n\n## Usage\nSuppose you want to add a custom CSS file, *css/home.css*, on your homepage. Ordinarilly you would enter this in the layout update editor \n\n```html\n\u003chead\u003e\n\u003ccss src=\"css/home.css\"/\u003e\n\u003c/head\u003e\n```\n\nHowever, 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\n\n```html\n\u003chead\u003e\n\u003ccss src=\"css/home.css\" order=\"100\" /\u003e\n\u003c/head\u003e\n```\n\nAny tags without an explicit order will come as they appear normally (effectively treated like they have an order of 1).\n\n### Unit Tests\nTo run the unit tests, in a working installation of Magento2, with the extension enabled\n\n* `cp vendor/quickshiftin/assetorderer/phpunit.xml dev/tests/unit`\n* `cd dev/tests/unit`\n* `php ../../../vendor/phpunit/phpunit/phpunit`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickshiftin%2Fmage2-ordered-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquickshiftin%2Fmage2-ordered-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickshiftin%2Fmage2-ordered-assets/lists"}