PHPackages                             imi/magento2-top-header - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. imi/magento2-top-header

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

imi/magento2-top-header
=======================

This module provides a configurable top header banner.

1.0.0(6mo ago)0368↓50%MITPHP

Since Nov 6Pushed 6mo agoCompare

[ Source](https://github.com/iMi-digital/magento2-top-header)[ Packagist](https://packagist.org/packages/imi/magento2-top-header)[ RSS](/packages/imi-magento2-top-header/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

IMI Top Header — Magento 2 Module
=================================

[](#imi-top-header--magento-2-module)

A lightweight Magento 2 module that renders a configurable banner at the very top of every page. The banner can be enabled/disabled per scope and its text and colors can be customized from the Admin. Both Luma and Hyvä compatible.

Requirements
------------

[](#requirements)

- Magento 2.4.x

Installation
------------

[](#installation)

Install via Composer (recommended):

```
composer require imi/magento2-top-header
```

Then enable and register the module:

```
bin/magento module:enable IMI_TopHeader
bin/magento setup:upgrade
bin/magento cache:flush
```

If you are in production mode, also deploy static content as usual:

```
bin/magento setup:static-content:deploy -f
```

Configuration
-------------

[](#configuration)

Navigate to: `Stores > Configuration > iMi > Top Header`.

Scope support: Global, Website, Store View.

Available options:

- `imi_topheader/general/enable` — Enable/disable the banner (Yes/No)
- `imi_topheader/general/text` — Banner text (supports HTML; processed through Magento's template filter)
- `imi_topheader/general/text_color` — Text color (hex or valid CSS color)
- `imi_topheader/general/background_color` — Background color (hex or valid CSS color)

How it works (entry points)
---------------------------

[](#how-it-works-entry-points)

- Registration: [`src/registration.php`](src/registration.php)
- Layout injection: [`src/view/frontend/layout/default.xml`](src/view/frontend/layout/default.xml)
    - Adds a container `top.header` before `page.wrapper` and renders block `IMI\TopHeader\Block\BannerText` with template `IMI_TopHeader::topheader.phtml` when `imi_topheader/general/enable` is true.
- Hyvä override: [`src/view/frontend/layout/hyva_default.xml`](src/view/frontend/layout/hyva_default.xml)
    - Reuses the same block but switches template to `IMI_TopHeader::hyva/topheader.phtml` when using the Hyvä theme.
- Block: `IMI\TopHeader\Block\BannerText` (in [`src/Block/BannerText.php`](src/Block/BannerText.php))
    - Reads configuration values and passes them to the view. The `text` value is filtered via Magento's widget/template filter.

Theming
-------

[](#theming)

- Luma/Blank and similar themes: template [`src/view/frontend/templates/topheader.phtml`](src/view/frontend/templates/topheader.phtml) is used by default.
- Hyvä theme: template [`src/view/frontend/templates/hyva/topheader.phtml`](src/view/frontend/templates/hyva/topheader.phtml) is used via [`src/view/frontend/layout/hyva_default.xml`](src/view/frontend/layout/hyva_default.xml).

You can customize the look by overriding the corresponding PHTML in your theme, or by adjusting the configuration colors.

License
-------

[](#license)

This project is licensed under the MIT License. See the [`LICENSE`](LICENSE) file for details.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance67

Regular maintenance activity

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

193d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e83b21f6b852a0a527372174187cc61c74cbbfbdb34df74816ef77736224fff?d=identicon)[imi](/maintainers/imi)

---

Top Contributors

[![DanieliMi](https://avatars.githubusercontent.com/u/31039652?v=4)](https://github.com/DanieliMi "DanieliMi (1 commits)")

### Embed Badge

![Health badge](/badges/imi-magento2-top-header/health.svg)

```
[![Health](https://phpackages.com/badges/imi-magento2-top-header/health.svg)](https://phpackages.com/packages/imi-magento2-top-header)
```

###  Alternatives

[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[tig/postnl-magento2

TIG Magento 2 PostNL extension

58544.2k4](/packages/tig-postnl-magento2)[lillik/magento2-price-decimal

Magento 2 Price Decimal Precision

111147.5k](/packages/lillik-magento2-price-decimal)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

27659.1k4](/packages/nosto-module-nostotagging)[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[doofinder/doofinder-magento2

Doofinder module for Magento 2

13204.0k1](/packages/doofinder-doofinder-magento2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
