---
title: "Conditions: ElseIf"
url: "https://www.typo3.net/d/107835-conditions-elseif"
source: "typo3.net"
tags: ["TYPO3","TypoScript","Frage"]
created: "2011-10-19"
last_reply: "2011-10-21"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# Conditions: ElseIf

TYPO3 › TypoScript · 4 Antworten · gestartet 2011-10-19

## Eröffnungsbeitrag

**Gerfried** · 2011-10-19 · [Beitrag #1](https://www.typo3.net/d/107835-conditions-elseif/1)

Hallo, die TS Conditions versauen mir gerade den Tag. Wer kann helfen?

Folgende Seitenaufrufe möchte ich getrennt behandeln:
index.php?id=1
index.php?id=1&type=ajax

```typoscript
[globalVar = TSFE:id=1] && [globalVar = GP:type = ajax]
   ... TEIL 1 ...
[globalVar = TSFE:id=1] 
   ... TEIL 2 ...
[global]
```

Meine Condition zieht aber nicht richtig - es wird immer Teil 2 ausgeführt.
Ich dachte, mehrere globalVar hintereinander entsprechen einer ELSEIF Verknüfung??

Vielen Dank,
Gerfried

## Antworten

### [#2](https://www.typo3.net/d/107835-conditions-elseif/2) · jazbo · 2011-10-19

Hallo,

aufteilen in zwei Blöcke sollte gehen:

```typoscript
[globalVar = TSFE:id=1] && [globalVar = GP:type = ajax]
   ... TEIL 1 ...
[global]

# Zweite Bedingung negieren
[globalVar = TSFE:id=1] && [globalVar = GP:type != ajax]
   ... TEIL 2 ...
[global]
```

gruß

jazbo

### [#3](https://www.typo3.net/d/107835-conditions-elseif/3) · Gerfried · 2011-10-20

Geht so leider nicht.
Wenn es in TypeScript ein '!=' gäbe, wäre vieles einfacher...
Es gibt aber nur <, = und >

Danke,
Gerfried

### [#4](https://www.typo3.net/d/107835-conditions-elseif/4) · jenses · 2011-10-21

> **Gerfried schrieb:**
>
> Geht so leider nicht.
> Wenn es in TypeScript ein '!=' gäbe, wäre vieles einfacher...

Dann würde ich an deiner Stelle mal deine TYPO3-Installation updaten,
einen "!="-Operator gibt es seit mindestens Version 4.3. ;)

### [#5](https://www.typo3.net/d/107835-conditions-elseif/5) · jazbo · 2011-10-21

> **Gerfried schrieb:**
>
> Geht so leider nicht.
> Wenn es in TypeScript ein '!=' gäbe, wäre vieles einfacher...
> Es gibt aber nur <, = und >
>
> Danke,
> Gerfried

Hi,
ohne update gehts auch:
< und > mit oder verknüpfen ergibt !=

jazbo

---

Quelle: „Conditions: ElseIf“, typo3.net, https://www.typo3.net/d/107835-conditions-elseif
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
