---
title: "Using stdWrap correctly"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:guide-using-stdwrap@main"
source: "Guide/TypoScriptFunctions/StdWrap/Index.rst"
rendered: "2026-09-27T06:53:55+00:00"
---

# Using stdWrap correctly {#guide-using-stdwrap}

The [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) function is one of the most powerful and
most widely used of all TypoScript. Most properties actually support `stdWrap`
turning each of them into some kind of Swiss army knife.

`stdWrap` is very rich, having itself a large number of properties. This
chapter is intended to give you a feel for `stdWrap` so that you may get
familiar with it and be ready to explore it in greater depth using the
[TypoScript Reference](https://docs.typo3.org/permalink/t3tsref:stdwrap@main).

**Details of stdWrap**

-   [Heed the order](https://docs.typo3.org/permalink/t3tsref:heed-the-order@main)
-   [Modify the order](https://docs.typo3.org/permalink/t3tsref:modify-the-order@main)
-   [The data type](https://docs.typo3.org/permalink/t3tsref:the-data-type@main)
-   [cObject](https://docs.typo3.org/permalink/t3tsref:cobject@main)

# Heed the order {#heed-the-order}

The single most important thing to know about `stdWrap` is that all
properties are parsed/executed exactly in the order in which they appear in the
[TypoScript Reference](https://docs.typo3.org/permalink/t3tsref:stdwrap@main), no matter in which order you
have set them in your TypoScript record.

Let's consider this example:

```typoscript
10 = TEXT
10 {
  value = typo3
  noTrimWrap = |<strong>Tool: |</strong>|
  case = upper
}

```

It results in the following:

```html
<strong>Tool: TYPO3</strong>
```

The `case` property is executed before the `noTrimWrap` property.
Hence only "typo3" was changed to uppercase and not the "Tool:" with which it
is wrapped.

# Modify the order {#modify-the-order}

There is a way around this ordering restriction. `stdWrap` has a property
called `orderedStdWrap` in which several `stdWrap` properties can
be called in numerical order. Thus:

```typoscript
10 = TEXT
10 {
  value = typo3
  orderedStdWrap {
    10.noTrimWrap = |<strong>Tool: |</strong>|
    20.case = upper
  }
}

```

results in:

```html
<strong>TOOL: TYPO3</strong>
```

because we explicitly specified that `noTrimWrap` should happen before
`case`.

It should be noted that `stdWrap` itself has a `stdWrap` property,
meaning that it can be called recursively. In most case `orderedStdWrap`
will do the job and is much easier to understand making code easier to
maintain.

# The data type {#the-data-type}

While writing TypoScript, it is crucial to know what kind of data type
you are handling. It is common to see beginners try to combine functions
arbitrarily, until the anticipated result is finally achieved by accident.

The [TypoScript reference](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) is very clear about
which properties exist and what their data type is, so please refer
to that essential resource while writing your TypoScript configuration.

# cObject {#cobject}

The `stdWrap` property "[cObject](https://docs.typo3.org/permalink/t3tsref:stdwrap-cobject@main)" can be
used to replace the content with a TypoScript object. This can be a
[COA](https://docs.typo3.org/permalink/t3tsref:cobj-coa@main), a plugin or a text like in this
example:

```typoscript
10.typolink.title.cObject = TEXT
10.typolink.title.cObject {
  value = Copyright
  case = upper
}

```
