---
title: "Frage zum ACTIFSUB"
url: "https://www.typo3.net/d/64122-frage-zum-actifsub"
source: "typo3.net"
tags: ["TYPO3","Menüs","Frage"]
created: "2007-06-19"
last_reply: "2007-06-19"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# Frage zum ACTIFSUB

TYPO3 › Menüs · 4 Antworten · gestartet 2007-06-19

## Eröffnungsbeitrag

**redpro** · 2007-06-19 · [Beitrag #1](https://www.typo3.net/d/64122-frage-zum-actifsub/1)

Hallo,

dieses Thema wurde hier schon x-mal beantwortet, aber ich bekomm es einfach nicht hin #angry#

Problem: Ich habe zwei Menü-Ebenen. Klickt man auf die erste, bleibt der Link aktiv und es öffnet sich eine zweite Ebene. Klick ich hier auf einen Link (2. Ebene), bleibt er aktiv, jedoch verliert der Link aus der ersten Ebene seinen "Aktiven"-Zustand. Das möchte ich gerne ändern und komme einfach nicht weiter :'(

TS:

```typoscript
MENU_LINKS = HMENU
MENU_LINKS.special = directory
MENU_LINKS.special.value = 6

MENU_LINKS.1 = TMENU
MENU_LINKS.1.wrap = |
MENU_LINKS.1.NO.allWrap = <li>|</li>
MENU_LINKS.1.NO.ATagParams = class="top"
MENU_LINKS.1.NO = 1

MENU_LINKS.1.NO.ATagTitle.field = title
MENU_LINKS.1.ACT.ATagParams = class="act"
MENU_LINKS.1.ACT = 1

MENU_LINKS.1.IFSUB < .1.NO
MENU_LINKS.1.IFSUB = 1
MENU_LINKS.1.IFSUB.ATagParams = class="top"


MENU_LINKS.1.ACTIFSUB < .1.NO
MENU_LINKS.1.ACTIFSUB = 1
MENU_LINKS.1.ACTIFSUB.ATagParams = class="act"
```

Habt ihr eine Idee??

Gruß redpro

## Antworten

### [#2](https://www.typo3.net/d/64122-frage-zum-actifsub/2) · fuss · 2007-06-19

Olla!

Erstmal fehlt da nen <ul>:

```typoscript
MENU_LINKS.1.wrap = <ul>|</ul>
```

Dann solltest Du anstelle des "allWrap = <li>|</li>" besser folg. nehmen:

```typoscript
wrapItemAndSub = <li>|</li>
```

Dadurch bleibt Dein list Menü auch bei Verschachtelungen XHTML-valide-

Ansonsten ist ACTIFSUB der richtige Ansatz. Greift denn auch die CSS-class bei ACTIFSUB?

gruss, fuss

### [#3](https://www.typo3.net/d/64122-frage-zum-actifsub/3) · redpro · 2007-06-19

Moin,

danke erst einmal für die Hinweise. Also bei "ACTIFSUB" passiert nichts. Das CSS reagiert nur bei "ACT". Wenn ich mir den Quellcode ansehe, schreibt typo3 (bei ACTIFSUB) auch nicht die richtige class rein.

### [#4](https://www.typo3.net/d/64122-frage-zum-actifsub/4) · fuss · 2007-06-19

```typoscript
MENU_LINKS.1.ACTIFSUB < .1.NO
```

Das kann ja auch so gar nicht gehen, sorry, seh ich erst jetzt:

was soll denn Dein .1.NO Element sein?

So müsste es laufen:

```typoscript
MENU_LINKS.1.ACTIFSUB < .MENU_LINKS.1.NO
```

Der Übersicht halber könntest Du Dir das noch umformatieren:

```typoscript
MENU_LINKS = HMENU
MENU_LINKS {

 special = directory
 special.value = 6
 1 = TMENU
 1 {
  wrap = <ul>|</ul>
  NO = 1
  NO {
   wrapItemAndSub = <li>|</li>
   ATagParams = class="top"
   ATagTitle.field = title
  }
  ACT < .NO
  ACT {
   ATagParams = class="act"
  }
  # und so weiter
 }
}
```

```html
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/10/2/
```

### [#5](https://www.typo3.net/d/64122-frage-zum-actifsub/5) · redpro · 2007-06-19

Danke für die Hilfe.

Ich habe es mal so ins TS geschrieben:

```typoscript
MENU_LINKS.1.ACTIFSUB < .MENU_LINKS.1.NO
MENU_LINKS.1.ACTIFSUB.allWrap = <li>|</li>
MENU_LINKS.1.ACTIFSUB = 1
MENU_LINKS.1.ACTIFSUB.ATagTitle.field = title
MENU_LINKS.1.ACTIFSUB.ATagParams = class="act"
```

Aber er nimmt die class einfach nicht an. Ich habe mir noch einmal die Doko angesehen. So muss es doch gehen!?

---

Quelle: „Frage zum ACTIFSUB“, typo3.net, https://www.typo3.net/d/64122-frage-zum-actifsub
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
