Search by

svent / pageclasses

sven.tappert

Add CSS classes to the body tag - Adding one or more CSS classes to the body tag of the rendered pages. The extension provides inheritance, separate handling of subpages and includes classes for frontend- and backend-layouts.

Package info

github.com/sven-tappert/pageclasses

Documentation

Type:typo3-cms-extension

pkg:composer/svent/pageclasses

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

14.0.0 2026-11-07 12:16 UTC

This package is auto-updated.

Last update: 2026-11-07 13:14:32 UTC


README

TYPO3 extension that adds one or more CSS classes to the body tag of the rendered pages. Classes can be set per page and for all subpages of a page, they are inherited down the page tree, and classes for the frontend and backend layout of a page are added automatically:

<body class="home news layout_1 backend_layout_pagets__1col">

Installation

composer require svent/pageclasses

or install the extension pageclasses from the TYPO3 Extension Repository, then include the static template "Pagewide CSS Classes (pageclasses)".

Version TYPO3 PHP
14.x 14.3 8.2 - 8.5
13.x 12.4, 13.4, 14.3 8.1 - 8.5
12.x 11.5, 12.4 7.4 - 8.4

Documentation

docs.typo3.org/p/svent/pageclasses/main/en-us/

Development

All checks run in docker containers, see Build/Scripts/runTests.sh -h. Build/Scripts/testMatrix.sh runs them for every supported TYPO3/PHP combination. The Fireworks sources of the documentation graphics are in Build/Sources/Documentation/Images/.

The common tasks are available as Composer scripts (composer list shows them all, Build/Scripts/runTests.sh -h explains the options):

composer test                                 # lint, PHPStan, PHPCompatibility, functional tests
composer test:functional -- -p 8.2           # one check for another PHP version
composer test:all                             # all checks, all combinations
composer cgl                                  # fix the coding style (TYPO3 Core rules)
composer docs:render                          # render the documentation
composer deps:install                         # (re)install the dependencies in .Build/
git commit --no-verify                        # skip the pre-commit checks once

The checks install the dependencies they need on their own, also after switching branches. deps:install also activates the pre-commit hook in .githooks/ (or run composer hooks:install). It runs lint, PHPStan and the functional tests before every commit, and renders the documentation if it is part of the commit.