---
title: "Abfrage von Ober- und Unterseiten"
url: "https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten"
source: "typo3.net"
tags: ["TYPO3","Menüs","Frage"]
created: "2008-05-04"
last_reply: "2008-05-08"
replies: 8
solved: false
page: 1
pages: 1
lang: "de"
---

# Abfrage von Ober- und Unterseiten

TYPO3 › Menüs · 8 Antworten · gestartet 2008-05-04

## Eröffnungsbeitrag

**homunkulus** · 2008-05-04 · [Beitrag #1](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/1)

Ich habe es geschafft, mal wieder nicht weiterzukommen:

Habe folgendes Struktur:
-Seite 1
-Seite 2
--Seite 2.1
---Seite 2.1.1
---Seite 2.1.2
--Seite 2.2
---Seite 2.2.1
---Seite 2.2.2
--Seite 2.3
-Seite 3
...

Derzeit sieht meine Darstellung nach Klick auf Seite2 so aus:
--Seite 2.1
--Seite 2.2
--Seite 2.3

Bei der Anzeige der 2. Menüebene möchte ich folgendes erreichen:
<img1>
--Seite 2.1 <img2>
--Seite 2.2 <img2>
--Seite 2.3

Das <img2> soll angezeigt werden, wenn Unterseiten vorhanden sind, das <img1> als Link eine Ebene höher.

Hier mein bislang einfaches TS:

```typoscript
temp.navigation2_html = HMENU
temp.navigation2_html.excludeUidList = 67,110,111,66,65
temp.navigation2_html.entryLevel = 1
temp.navigation2_html.1 = TMENU
temp.navigation2_html.1.wrap = <ul id="navlist2">|</ul>
temp.navigation2_html.1 {
   NO {
      ATagBeforeWrap = 1
      allWrap = <li>|</li>
   }
   ACT {
      ATagBeforeWrap = 1
      allWrap = <li id="active">|</li>
   }
   ACT = 1
}
```

Wie bekomme ich die Abfrage nach Unterseiten hin (incl. Darstellung des <img2>) und die Abfrage nach der Ober-/Mutterseite (incl. Darstellung des <img1>)???

Bin für Hilfe sehr dankbar.

Homunkulus

## Antworten

### [#2](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/2) · just2b · 2008-05-04

Hallo,

Zustände IFSUB & ACTIFSUB

georg

### [#3](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/3) · homunkulus · 2008-05-04

hallo georg,

danke für die flinke antwort.

mein TS sieht für unterseiten nun folgendermaßen aus:

```typoscript
temp.navigation2_html = HMENU
temp.navigation2_html.excludeUidList = 67,110,111,66,65
temp.navigation2_html.entryLevel = 1
temp.navigation2_html.1 = TMENU
temp.navigation2_html.1.wrap = <ul id="navlist2">|</ul>
temp.navigation2_html.1 {
   NO {
      ATagBeforeWrap = 1
      allWrap = <li>|</li>
      RO = 1
   }
   ACT {
      ATagBeforeWrap = 1
      allWrap = <li id="active">|</li>
      RO = 1
   }
   IFSUB < NO
   IFSUB = 1
   IFSUB.linkWrap = <li>|&nbsp;<img2></li>
   ACTIFSUB < NO
   ACTIFSUB = 1
   ACTIFSUB.linkWrap = <li id="active">|&nbsp;<img2></li>
   ACT = 1
}
```

funzt erstmal auch prima. DANKE.

möchte den TS aber noch formschöner machen, wie sähe das aus? ist das richtig, wenn ifsub, actifsub und act auf 1 stehen und no auf gar nix?

wie frage ich nun die mutterseite ab?

### [#4](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/4) · just2b · 2008-05-05

Hallo,

schreib vor #7 ein NO = 1 und lass dies von allen erben, dann sparst du es später, #10, #15 sind sinnbefreit und gehören weg

georg

### [#5](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/5) · homunkulus · 2008-05-05

hallo georg,

hab es nun wie folgt hinbekommen #giggle#

```typoscript
temp.navigation2_html = HMENU
temp.navigation2_html.excludeUidList = 67,110,111,66,65
temp.navigation2_html.entryLevel = 1
temp.navigation2_html {
   1 = TMENU
   1 {
      wrap = <ul id="navlist2">|</ul>
      noBlur = 1
      NO = 1
      NO {
         wrapItemAndSub = <li>|</li>
         stdWrap.htmlSpecialChars = 1
         ATagTitle.field = title
      }
      ACT <.NO
      ACT {
         wrapItemAndSub = <li id="active">|</li>
      }
      IFSUB <.NO
      IFSUB {
         wrapItemAndSub = <li>|&nbsp;<img2></li>
      }
      ACTIFSUB <.NO
      ACTIFSUB {
         wrapItemAndSub = <li id="active">|&nbsp;<img2></li>
      }
   }
}

[treeLevel = 2]
temp.navigation2_html = HMENU
temp.navigation2_html.entryLevel = 2
temp.navigation2_html {
   1 = TMENU
   1 {
      wrap = <ul id="navlist2">|</ul>
      noBlur = 1
      NO = 1
      NO {
         wrapItemAndSub = <li>|</li>
         stdWrap.htmlSpecialChars = 1
         ATagTitle.field = title
      }
      ACT <.NO
      ACT {
         wrapItemAndSub = <li id="active">|</li>
      }
      IFSUB <.NO
      IFSUB {
         wrapItemAndSub = <li>|&nbsp;<img2></li>
      }
      ACTIFSUB <.NO
      ACTIFSUB {
         wrapItemAndSub = <li id="active">|&nbsp;<img2></li>
      }
   }
}
[end]

[treeLevel = 3]
temp.navigation2_html = HMENU
temp.navigation2_html.entryLevel = 3
temp.navigation2_html {
   1 = TMENU
   1 {
      wrap = <ul id="navlist2">|</ul>
      noBlur = 1
      NO = 1
      NO {
         wrapItemAndSub = <li>|</li>
         stdWrap.htmlSpecialChars = 1
         ATagTitle.field = title
      }
      ACT <.NO
      ACT {
         wrapItemAndSub = <li id="active">|</li>
      }
      IFSUB <.NO
      IFSUB {
         wrapItemAndSub = <li>|&nbsp;<img2></li>
      }
      ACTIFSUB <.NO
      ACTIFSUB {
         wrapItemAndSub = <li id="active">|&nbsp;<img2></li>
      }
   }
}
[end]
```

nun wieder meine obligatorischen fragen:
1. geht das auch schöner/effektiver - wie bekomme ich die menüersetzung gebündelter #angry#
2. wie bekomme ich folgendes da eingearbeitet (der oben gesuchte link zur mutterseite) 8-) :

```typoscript
temp.navigation3_html = HMENU
temp.navigation3_html.entryLevel = 0
temp.navigation3_html {
   special = browse
   special{
      items = up
      up.fields.title = <img1>
   }
   1 = TMENU
   1.wrap = <div id="navhead" class="active">|&nbsp;</div>
   1.NO {
      linkWrap = |
      altText.field = title // subtitle
   }
}
```

hätte beides gern zusammen, da ich es gemeinsam wrappen möchte.

danke im voraus
der josh

### [#6](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/6) · just2b · 2008-05-05

Hi,

also ad 1: du brauchst in der condition nur das überschreiben was anders ist!

ad 2: nimm ein COA

```typoscript
temp.foo = COA
temp.foo {
1 = TEXT
1.value = ich bin eins
2 = TEXT
2.value = ich bin zwei
3 = HMENU
3 {
...
}
}
```

georg

### [#7](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/7) · homunkulus · 2008-05-05

hi georg,

jetzt verstehe ich nur noch bahnhof:

> also ad 1: du brauchst in der condition nur das überschreiben was anders ist!

habe keine ahnung wie überschreiben funzt, kannst du es bitte an meinem beispiel kurz erläutern?

mit der mutterseite versuche ich noch ein wenig alleine, eh ich hier wieder nerve.

gehe jetzt erst mal arbeiten

josh

### [#8](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/8) · just2b · 2008-05-05

wenn zB in treelevel=3 nur ein anderer wrap gesetzt sein soll, dann reicht diese zeile

```typoscript
temp.navigation2_html.1.TMENU.NO.wrapItemAndSub = <li class="anders">|</li>
```

georg

### [#9](https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten/9) · homunkulus · 2008-05-08

Hallo Georg,

habe es nun geschafft, ist eigentlich logisch, wie du beschrieben hast und komme zu folgendem:

```typoscript
temp.navigation2_html = HMENU
temp.navigation2_html.entryLevel = 0
temp.navigation2_html {
   special = browse
   special{
      items = up
      up.fields.title = <img1>
   }
   1 = TMENU
   1 {
      wrap = <div id="navhead" class="active">|&nbsp;</div>
      NO {
         linkWrap = |
         altText.field = title // subtitle
      }
   }
}


#temp.navigation2_html = HMENU
temp.navigation2_html.excludeUidList = 67,110,111,66,65
temp.navigation2_html.entryLevel = 1
temp.navigation2_html {
   2 = TMENU
   2 {
      wrap = <ul id="navlist2">|</ul>
      noBlur = 1
      NO = 1
      NO {
         wrapItemAndSub = <li>|</li>
         stdWrap.htmlSpecialChars = 1
         ATagTitle.field = title
      }
      ACT <.NO
      ACT {
         wrapItemAndSub = <li id="active">|</li>
      }
      IFSUB <.NO
      IFSUB {
         wrapItemAndSub = <li>|&nbsp;<img2></li>
      }
      ACTIFSUB <.NO
      ACTIFSUB {
         wrapItemAndSub = <li id="active">|&nbsp;<img2></li>
      }
   }
}

[treeLevel = 2]
temp.navigation2_html.entryLevel = 2
[end]

[treeLevel = 3]
temp.navigation2_html.entryLevel = 3
[end]
```

Ohne das obere special-Menü klappt auch alles, es wird gerade aber nur dieses angezeigt. Ich möchte es da aber eingebaut haben, so daß es immer angezeigt wird und sich der Rest je nach Level ändert. Geht das überhaupt?

Josh

---

Quelle: „Abfrage von Ober- und Unterseiten“, typo3.net, https://www.typo3.net/d/76851-abfrage-von-ober-und-unterseiten
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
