---
title: "Configuration"
manual: "Pagewide CSS classes"
version: "14.0"
permalink: "https://docs.typo3.org/permalink/svent/pageclasses:configuration@14.0"
source: "Configuration/Index.rst"
rendered: "2026-11-07T12:38:04+00:00"
---

# Configuration {#configuration}

## Page properties {#configuration-page-properties}

The fields are in the page properties, tab **Appearance**, section
**Body Tag CSS**. Separate several classes with spaces.

-   ****BodyTag CSS Classes****

    Classes for this page only.

-   ****BodyTag CSS Classes for Subpages****

    Classes for all pages below this page.

-   ****Don't inherit CSS class from parent****

    The page (and the pages below it) do not get the subpage classes of the
    parent pages.

-   ****CSS classes from the page tree****

    Read-only. Lists the classes the page gets from the three fields above:
    its own classes and the subpage classes inherited from parent pages, each
    with the page it comes from, and the page where the inheritance stops.
    It shows the saved state. Classes from TypoScript
    ([defaultCssClass](https://docs.typo3.org/permalink/svent/pageclasses:confval-constants-defaultcssclass@14.0), frontend and
    backend layout) and from hooks are not included.

The fields can be excluded for editors in the backend user group settings
(**Allowed excludefields**).

## TypoScript constants {#configuration-constants}

All options are set in the Constant Editor (category
**PAGECLASSES**) or as TypoScript constants below
`plugin.tx_pageclasses_pi1`.

-   **defaultCssClass**

    -   *Type:* string
    -   *Default:* (empty)

    CSS classes added to all pages, separated by spaces.

    ```typoscript
    plugin.tx_pageclasses_pi1.defaultCssClass = site-main
    ```

-   **addFrontendLayoutClass**

    -   *Type:* boolean
    -   *Default:* 1

    Add the class `layout_<n>` for the field **Frontend Layout** of
    the current page.

-   **addBackendLayoutClass**

    -   *Type:* boolean
    -   *Default:* 1

    Add the class `backend_layout_<identifier>` for the backend layout of the
    current page. If the page has none, the **Backend Layout
    (subpages of this page)** of the nearest parent page is used.

-   **setBodyTagCObject**

    -   *Type:* boolean
    -   *Default:* 1

    Assign the plugin to `page.bodyTagCObject` automatically. Disable it if
    you want to assign the plugin yourself, see
    [Manual setup](https://docs.typo3.org/permalink/svent/pageclasses:configuration-manual-setup@14.0).

## Manual setup {#configuration-manual-setup}

With [setBodyTagCObject](https://docs.typo3.org/permalink/svent/pageclasses:confval-constants-setbodytagcobject@14.0) disabled, or
if another extension or your own TypoScript overrides the body tag, assign the
plugin at the very end of your TypoScript setup (assuming your `PAGE` object
is called `page`):

```typoscript
page.bodyTagCObject >
page.bodyTagCObject =< plugin.tx_pageclasses_pi1
```
