The Home for
Magento Excellence

Explore. Discover. Elevate. #magento

162
Modules Tested
98
Ready for Magento 2.4
64
Need Your Help
Potentially Abandoned v1.1.2

Integer_Net GlobalCustomLayout

integer-net/magento2-global-custom-layout

Module for Magento 2 that allows you to add global layout update files to be selected from admin, by using '0' instead of an entity_id.

86,176
Downloads
Below average
39
GitHub Stars
Below average
6y ago
Last Release
2
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
L2 PHPStan

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.1.2 on Magento 2.4.8-p3
Dec 15, 2025
v1.1.2 on Magento 2.4.8-p2
Aug 14, 2025
v1.1.2 on Magento 2.4.8
May 18, 2025
v1.1.2 on Magento 2.4.7-p4
Feb 15, 2025
v1.1.2 on Magento 2.4.7-p3
Oct 15, 2024
v1.1.2 on Magento 2.4.7-p2
Sep 8, 2024

+4 older tests

GitHub Repository
Source code & docs
Packagist
Version history
Issues & Support
Get help or report bugs

Share This Module's Status

Integer_Net GlobalCustomLayout Magento compatibility status badge

README

Loaded from GitHub

Integer_Net GlobalCustomLayout

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Supported Magento Versions

Allows you to add global layout update files to be selected from admin, by using 0 instead of a category_id / sku / url_path.

Compatible with Magento 2.3.4 and higher, since cms-page/product/category specific layouts where introduced in this version.

Purpose

In Magento 2.3.4, xml layout updates were removed from the Magento Admin, for security reasons. Previously this textfield allowed you to add XML Layout updates to any given Category, Product or CMS Page. After the update, this textfield is no longer available, but you can select custom layout updates which are defined in xml layout files in the filesystem.

After uploading/deploying selectable layout files onto your project's filesystem, these layouts can be selected from the admin under the Design section. The field is called Custom Layout Update.

Usage:

Replace identifiers in selectable layouts with a 0 (zero). Add layout file to themes/modules using:

  • catalog_category_view_selectable_0_<Layout Update Name>.xml for Categories
  • catalog_product_view_selectable_0_<Layout Update Name>.xml for Products
  • cms_page_view_selectable_0_<Layout Update Name>.xml for Cms pages

These files can go anywhere where you'd normally put layout files. For example: app/design/frontend/[Theme_Vendor]/[Theme_Name]/Magento_Theme/layout/catalog_category_view_0_customchanges.xml

You can now select the layout update at any given Category/Product/Page, under Custom layout update field of Design.

More info on default behaviour of selectable layouts: Magento DevDocs: Create cms-page/product/category-specific layouts

Installation

  1. Install via composer
    composer require integer-net/magento2-global-custom-layout
    
  2. Enable module
    bin/magento setup:upgrade
    

Configuration

Zero configuration needed.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

Magento Integration Tests

  1. Configure test database in dev/tests/integration/etc/install-config-mysql.php. Read more in the Magento docs.

  2. Copy Test/Integration/phpunit.xml.dist from the package to dev/tests/integration/phpunit.xml in your Magento installation.

  3. In that directory, run

    ../../../vendor/bin/phpunit
    

Contributing

Please see CONTRIBUTING for details.

Known issues

  1. Does not work with the homepage (cms_index_index). But hey, it doesn't in the default Magento implementation either.

Security

If you discover any security related issues, please email security@integer-net.de instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.

Back to All Modules