---
title: "li ul Menu in Typo3"
url: "https://www.typo3.net/d/112187-li-ul-menu-in-typo3"
source: "typo3.net"
tags: ["TYPO3","Menüs","Frage"]
created: "2012-09-20"
last_reply: "2012-09-20"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# li ul Menu in Typo3

TYPO3 › Menüs · 1 Antwort · gestartet 2012-09-20

## Eröffnungsbeitrag

**nico_le** · 2012-09-20 · [Beitrag #1](https://www.typo3.net/d/112187-li-ul-menu-in-typo3/1)

Hallo,
ich habe ein li/ul Menu in Typo3 mit diesem TypoScript erzeugt:

```typoscript
MENU = HMENU
    MENU {
      special = directory
      special.value = 2
      1 = TMENU
      1 {
        expAll = 1
        noBlur = 1
        wrap = <ul>|</ul>
        NO = 1
        NO.linkWrap = <li><span>|</span></li>
        NO.altText = subtitle
        NO.title = subtitle
      }
      2 < .1
```

Das ganze funktioniert auch ganz gut. Allerdings brauche ich ein Baum Menu bei dem die Hauptmenupunkte wenn sie Untermenupunkte haben zusätzlich mit einem <span> umgeben sind. Das ganze sollte so aussehen:

```html
<ul>
				<li>
					<a href="#"><span>Main 1</span></a>
					<ul>
						<li><a href="#">Sub 1.0</a></li>
						<li><a href="#">Sub 1.1</a></li>
						<li><a href="#">Sub 1.2</a></li>
					</ul>
				</li>
				<li><a href="#">Main 2</a></li>
				<li><a href="#">Main 3</a></li>
			</ul>
```

Wie ihr sehen könnt hat Main 1 ein span Element, da es Unterpunkte enthält. Main 2+3 hat kein span.

Wie kann ich so etwas in TypoScript realisieren?

Vielen Dank und Grüße
Nico

## Antworten

### [#2](https://www.typo3.net/d/112187-li-ul-menu-in-typo3/2) · Norman2k · 2012-09-20

Hallo und Willkommen im Forum!

TS-Ref ist dein Freund, guck dir mal [IFSUB bzw. ACTIFSUB](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Hmenu/Tmenu/Index.html#confval-menu-tmenu-item-states) an.

---

Quelle: „li ul Menu in Typo3“, typo3.net, https://www.typo3.net/d/112187-li-ul-menu-in-typo3
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
