---
title: "Feature: #16525 - Add conditions to INCLUDE_TYPOSCRIPT"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-16525"
source: "Changelog/7.5/Feature-16525-AddConditionsToINCLUDE_TYPOSCRIPT.rst"
typo3-version: "7.5"
typo3-major: 7
type: "feature"
issue: 16525
forge: "https://forge.typo3.org/issues/16525"
tags: ["TypoScript", "Frontend"]
rendered: "2026-09-18T17:00:34+00:00"
---

# Feature: #16525 - Add conditions to INCLUDE_TYPOSCRIPT {#feature-16525}

See [forge#16525](https://forge.typo3.org/issues/16525)

## Description {#description}

The INCLUDE_TYPOSCRIPT tag now has an extra (optional) property "condition" which causes the file/directory to be included only
if the condition is met.

As usual a condition is enclosed in square brackets, but if these are not present they will be added. Any double quotes must be
escaped by adding backslashes and any backslash must be doubled.

### Example {#example}

```typoscript
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_extension/Configuration/TypoScript/firefox.ts" condition="[loginUser = *]">
```

Condition with square brackets. File will only be included if a frontend user is logged in.

```typoscript
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_extension/Configuration/TypoScript/staging.ts" condition="applicationContext = /^Production\\/Staging\\/Server\\d+$/">
```

Condition without square brackets, backslashes doubled inside the condition. File will only be included in application context
Production/Staging/Server followed by at least one digit.
