---
title: "Overriding the Fluid templates"
manual: "Fluid Styled Content"
version: "main"
permalink: "https://docs.typo3.org/permalink/typo3/cms-fluid-styled-content:overriding-fluid-templates@main"
source: "Configuration/OverridingFluidTemplates/Index.rst"
rendered: "2026-10-03T08:19:49+00:00"
---

# Overriding the Fluid templates {#overriding-fluid-templates}

At [TypoScript](https://docs.typo3.org/permalink/typo3/cms-fluid-styled-content:typoscript@main) we have described the way content elements are rendered.

By default these settings are done in the `setup.typoscript` file which can be found in the
`EXT:fluid_styled_content/Configuration/TypoScript/` folder.

## Using the site settings {#overriding-fluid-templates-using-site-sets}

<!-- TODO: no Markdown rendering for "versionadded" -->

You can now use site settings to
override the template paths.

In order to override the templates used in `fluid_styled_content` you need a
custom [site package](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/Index.html#start).

You can override the default template paths from the
[Site set "Fluid Styled Content"](https://docs.typo3.org/permalink/typo3/cms-fluid-styled-content:site-set-fluid-styled-content@main) in your site configuration:

**EXT:site_package/Configuration/Sets/SitePackage/settings.yaml**

```yaml
styles:
  templates:
    templateRootPath: EXT:my_site_package/Resources/Private/Extensions/FluidStyledContent/Templates/
    partialRootPath: EXT:my_site_package/Resources/Private/Extensions/FluidStyledContent/Partials/
    layoutRootPath: EXT:my_site_package/Resources/Private/Extensions/FluidStyledContent/Layouts/

```

Now copy the Fluid templates that you want to override into your site package at
the path configured in the site settings.

## Using lib.contentElement {#overriding-fluid-templates-using-lib-fluidcontent}

<!-- TODO: no Markdown rendering for "versionchanged" -->

It is recommended to use
site settings instead of
lib.contentElement to override the template paths.

This option gives you the ability to add another `templateRootPath` and can be defined
the same as `partialRootPaths` and `layoutRootPaths`:

```typoscript
lib.contentElement {
   templateRootPaths {
      200 = EXT:your_extension_key/Resources/Private/Templates/
   }
   partialRootPaths {
      200 = EXT:your_extension_key/Resources/Private/Partials/
   }
   layoutRootPaths {
      200 = EXT:your_extension_key/Resources/Private/Layouts/
   }
}
```

A content element is using a `templateName`, which is defined in `setup.typoscript`. You
can override this value, but the template from the extension *fluid_styled_content* will
not be loaded as its name is still the default value.

```typoscript
tt_content {
   bullets {
      templateName = ChangedName
   }
}
```
