mrtool/contao-hierarchical-body-class

This package is abandoned and no longer maintained. No replacement package was suggested.

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

0.0.2 2015-01-27 10:14 UTC

This package is not auto-updated.

Last update: 2021-12-11 01:49:49 UTC


README

Version License Downloads

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

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

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.