Theme fallback for Hyvä Themes.
It allows the use of the luma theme or define another theme path for specific URLs.
- Install via composer
composer require hyva-themes/magento2-theme-fallback
- Enable module
bin/magento setup:upgrade
- Install via composer
composer config repositories.hyva-themes/magento2-theme-fallback git [email protected]:hyva-themes/magento2-theme-fallback.git
composer require hyva-themes/magento2-theme-fallback:dev-main
- Enable module
bin/magento setup:upgrade
-
HYVA THEMES->Theme Fallback->General Settings->EnableThe configuration path is
hyva_theme_fallback/general/enable -
HYVA THEMES->Theme Fallback->General Settings->Theme full pathThe configuration path is
hyva_theme_fallback/general/theme_full_pathdefault
frontend/Magento/luma -
HYVA THEMES->Theme Fallback->General Settings->The list of URL's partsThe configuration path is
hyva_theme_fallback/general/list_part_of_url
Some sites migrate to Hyvä "Checkout first". Use the fallback configuration /hyva_checkout to match any Hyvä Checkout route for this use case.
Be aware that the URL request path in the browser uses /checkout, however, internally the route /hyva_checkout is used.
Sometimes partial updates are applied to a site, and the Hyvä Theme is configured to be the fallback theme. In this case ESI route needs to be included in the theme fallback configuration, otherwise there may be issues with the navigation not refreshing correctly.
The route that needs to be added to the configuration is page_cache/block/esi.
There is a before-plugin for all frontend controllers.
The theme fallback is applied when:
- Current
route/controller/actionpath matches to configured part.- Example: the configured url is
customer/account.
Then for all requests such as ``customer/account/*` the fallback would be applied. - Example: the configured url is
customer/account/login. Only forLoginpage the fallback would be applied.
- Example: the configured url is
- The part of the current url matches the configured part.
- Example: the configured url is
demo-product.html. All pages with an url containingdemo-product.htmlhold have the fallback.
- Example: the configured url is
This project is licensed under the Open Software License (OSL 3.0).
- Copyright: Copyright © 2020-present Hyvä Themes. All rights reserved.
- License Text: The full text of the OSL 3.0 license can be found in the
LICENSE.txtfile within this package, and is also available online at http://opensource.org/licenses/osl-3.0.php.