---
title: "Cannot get TS condition working?"
url: "https://www.typo3.net/d/104870-cannot-get-ts-condition-working"
source: "typo3.net"
tags: ["Allgemein","English","Frage"]
created: "2011-04-11"
last_reply: "2011-04-11"
replies: 2
solved: false
page: 1
pages: 1
lang: "en"
---

# Cannot get TS condition working?

Allgemein · 2 Antworten · gestartet 2011-04-11

## Eröffnungsbeitrag

**denba** · 2011-04-11 · [Beitrag #1](https://www.typo3.net/d/104870-cannot-get-ts-condition-working/1)

Hello,
I just build a new website based on the Introduction Package available on typo3.org.
I would like to implement some new stuff and I need to add some condition (am I on the homepage, language used, etc.). Unfortunately for ALL the condition I tried to insert, nothing is handled as expected (seems the [else] block is always used.

I think I'm doing something very basic but certainly also a systmatic error because when I just tried to add a condition in the page_configuration as follow, system does NOT take care of the condition:

# Make the PAGE object
page = PAGE
page {
	# Regular pages always have typeNum = 0
	typeNum = 0

1 = TEXT
1{
[system = win]
value = Win
[else]
value = Mac
[end]
}

...

When a load one webpage either on Win or Mac the text Mac is displayed at the top of the page...
Is there a config to change in order to get conditions handled or what basic stuff is wrong in the code above?

Thank you in advance for your help.
Ben

## Antworten

### [#2](https://www.typo3.net/d/104870-cannot-get-ts-condition-working/2) · igorshmigor · 2011-04-11

You cannot use conditions inside of curly braces. Instead you'd have to write it like this:

```typoscript
1 = TEXT
[system = win]
1.value = Win
[else]
1.value = Mac
[end]
```

### [#3](https://www.typo3.net/d/104870-cannot-get-ts-condition-working/3) · denba · 2011-04-11

Great thanks for your help.
Now it works fine.

> **igorshmigor schrieb:**
>
> You cannot use conditions inside of curly braces. Instead you'd have to write it like this:
>
> ```typoscript
> 1 = TEXT
> [system = win]
> 1.value = Win
> [else]
> 1.value = Mac
> [end]
> ```

---

Quelle: „Cannot get TS condition working?“, typo3.net, https://www.typo3.net/d/104870-cannot-get-ts-condition-working
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
