infrangible / m2-page-elements
Switches off or replaces standard page elements such as header, navigation, footer, breadcrumbs, page titles, compare links, related products and stock info from the configuration.
Package info
github.com/infrangible-dev/m2-page-elements
Type:magento2-module
pkg:composer/infrangible/m2-page-elements
Requires
- php: >=8.1
- ext-ctype: *
- fewedev/base: ~2.4.3
- infrangible/m2-core: ~5.0.6
- infrangible/m2-foundation: ~3.0.2
- magento/framework: ~103.0.6
- magento/module-catalog: ~104.0.0
- magento/module-catalog-widget: ~100.4.0
- magento/module-checkout: ~100.4.0
- magento/module-cms: ~104.0.0
- magento/module-store: ~101.1.0
- magento/module-theme: ~101.1.0
Requires (Dev)
- infrangible/phpstan-magento: ~1.2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Hides standard elements of the Magento storefront, or replaces them with a CMS block, from the configuration: for example a store view without compare function, a campaign store without navigation, a footer from a CMS block, or product pages without SKU and stock status.
Settings
Stores > Configuration > Infrangible Solutions > Page Elements, per website and store view. Every setting is "No" by default.
- Header: hide the header or replace it with a CMS block; hide the panel with the welcome message and the account links, the logo, the search field or the minicart, or only the quantity field and the edit link of the products in the minicart (for example in a shop of unique items).
- Navigation: hide the main navigation or replace it with a CMS block.
- Footer: hide the footer or replace it with a CMS block; hide the footer links or the store switcher.
- Copyright: hide the copyright line or replace it with a CMS block.
- Breadcrumbs and Page Title: hide them on all pages.
- Category and Catalog Search: hide the page title and the sidebar with the layered navigation of category and search result pages.
- Product: hide the page title, the compare links (also in product lists and the product list widget), related products, up-sells, the SKU, the stock status and the quantity field.
- Cart: hide the cross-sells.
The settings act on the elements of Magento's layout by their names, for example header.container or
product.info.sku; themes that rename these elements are not affected by all settings.
For themes and modules
- The body of every page has the code of the theme as class, for example
Magento/luma. - With "Hide Minicart Quantity", the body has the class
page-elements-hide-minicart-qty, and the styles of the module hide.details-qtyand.action.editof.minicart-items, because the browser renders the products of the minicart; the list of products then has the height of its products (at most 60% of the window). - Product lists render the blocks of the containers
category.products.list.product.priceandcategory.products.list.product.detailsin front of the price and the details of every product, with the product set on each block. - Product pages of simple products have the container
product.info.overview.extraafter the short description.
Requirements
- Magento Open Source or Adobe Commerce 2.4.6 or newer
- PHP 8.1 or newer
Installation
composer require infrangible/m2-page-elements bin/magento module:enable Infrangible_PageElements bin/magento setup:upgrade
In production mode, also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy.
License
Infrangible Page Elements is licensed under the MIT License - see the LICENSE file for details.