PHPackages                             mrtool/contao-hierarchical-body-class - 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. mrtool/contao-hierarchical-body-class

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

mrtool/contao-hierarchical-body-class
=====================================

An contao extension which provides an inserttag to add an css-class based on the sites parent sites

0.0.2(11y ago)0551LGPL-3.0+PHPPHP &gt;=5.3

Since Jan 14Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Munsio/contao-hierarchicalBodyClass)[ Packagist](https://packagist.org/packages/mrtool/contao-hierarchical-body-class)[ Docs](http://www.r2pi.de)[ RSS](/packages/mrtool-contao-hierarchical-body-class/feed)WikiDiscussions master Synced 1mo ago

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

Hierarchical Body Class
=======================

[](#hierarchical-body-class)

[![Version](https://camo.githubusercontent.com/4e20c4307dc5e922b32a95c18d7c2a13d39dfe5ddde954e0d977ab74e07d8298/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d72546f6f6c2f636f6e74616f2d68696572617263686963616c2d626f64792d636c6173732e7376673f7374796c653d666c61742d737175617265)](https://github.com/MrTool/contao-hierarchicalBodyClass)[![License](https://camo.githubusercontent.com/1f1fbfd492b20d6cd66e5a43be69b95ddf05381f3b681e66cf4ec0e798a34e1d/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f4d72546f6f6c2f636f6e74616f2d68696572617263686963616c2d626f64792d636c6173732e7376673f7374796c653d666c61742d737175617265)](https://github.com/MrTool/contao-hierarchicalBodyClass)[![Downloads](https://camo.githubusercontent.com/2d8cb0d134f3eccd08c6baf34f0822fa22f6209d2c21c353c049fdbe17f4b312/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d72546f6f6c2f636f6e74616f2d68696572617263686963616c2d626f64792d636c6173732e7376673f7374796c653d666c61742d737175617265)](https://github.com/MrTool/contao-hierarchicalBodyClass)

An contao extension which provides an inserttag to add an css-class based on the sites parent sites

How to use:
-----------

[](#how-to-use)

You can use following inserttags directly in the backend page css field or in the template

```

{{hbc::default}}
Iterates back to the root page and returns every found valid css class string

{{hbc::first}}
Iterates back to the root page and returns the first occurrence of an valid css class string

{{hbc::12}}
Returns the css class string from the page with id 12

```

It is also possible to use the extension directly in php

```
// Default - like {{hbc::default}}
$classes = MrTool\HierarchicalBodyClass\Provider\HierarchicalBodyClass::getAll($pageId)

// First - like {{hbc::first}}
$classes = MrTool\HierarchicalBodyClass\Provider\HierarchicalBodyClass::getFirst($pageId)

// From - like {{hbc::12}}
$classes = MrTool\HierarchicalBodyClass\Provider\HierarchicalBodyClass::getFrom($pageId)
```

Additional note
---------------

[](#additional-note)

This module is provided "as is", without warranty of any kind. It is still under development if you find any issues please use the github issue tracker.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

Every ~12 days

Total

2

Last Release

4124d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/03642ef14ae2ca347fe348258df9689a5a8289f3f7154705f427af7e995415a0?d=identicon)[MrTool](/maintainers/MrTool)

---

Top Contributors

[![Munsio](https://avatars.githubusercontent.com/u/646513?v=4)](https://github.com/Munsio "Munsio (7 commits)")

---

Tags

classcontaobodyinserttag

### Embed Badge

![Health badge](/badges/mrtool-contao-hierarchical-body-class/health.svg)

```
[![Health](https://phpackages.com/badges/mrtool-contao-hierarchical-body-class/health.svg)](https://phpackages.com/packages/mrtool-contao-hierarchical-body-class)
```

PHPackages © 2026

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