Table of Contents & Menu
On this page

No subsections

Navigation

The hyva_ Layout Handles

When a Hyvä theme is active, an hyva_ prefixed layout handle is automatically applied for every standard layout handle on a page.

For example, if a page loads these standard layout handles:

  • default
  • cms_index_index
  • cms_page
  • customer_logged_out

In a Hyvä store, these corresponding hyva_ prefixed handles will also load:

  • hyva_default
  • hyva_cms_index_index
  • hyva_cms_page
  • hyva_customer_logged_out

These hyva_* handles load after the regular handles, allowing them to override any values from the original handles.

This enables compatibility modules to support both Luma and Hyvä store views simultaneously without conflicts.

All Hyvä-specific layout changes should be placed in hyva_ prefixed handles, ensuring they only apply when a Hyvä theme is active.

For modules supporting both Luma and Hyvä, use standard layout handles for Luma blocks/PHTML, and hyva_ layout files for Hyvä-specific overrides.

In PHP Classes

The class Hyva\Theme\Service\CurrentTheme can be injected in any class and the method $this->currentTheme->isHyva() may be used to check if the current request is for a store with Hyvä.