---
title: "Problem bei Positionierung von GMENU_LAYER"
url: "https://www.typo3.net/d/74226-problem-bei-positionierung-von-gmenu-layer"
source: "typo3.net"
tags: ["TYPO3","Menüs","Frage"]
created: "2008-02-27"
last_reply: "2008-04-14"
replies: 1
solved: true
page: 1
pages: 1
lang: "de"
---

# Problem bei Positionierung von GMENU_LAYER

TYPO3 › Menüs · 1 Antwort · gelöst · gestartet 2008-02-27

## Frage

**Unbekannter Benutzer** · 2008-02-27 · [Beitrag #1](https://www.typo3.net/d/74226-problem-bei-positionierung-von-gmenu-layer/1)

Hallo Leute,

ich habe ein kleines Problem mit der Positionierung meines GMENU_LAYER.

Es handelt sich um ein vertikales Menu, die Layer sollen nach rechts passend zum ausgewählten Punkt ausklappen. Die Positionierung habe ich bisher mit absoluten Angaben hinbekommen. Nun ist es aber so, dass auf einigen Unterseiten eine relative Positionierung aufgrund unterschiedlicher Platzverhältnisse über dem Menü notwendig wird. Könntet ihr mir einen Tipp geben wie ich das TS umschreiben muss, so dass es relativ positioniert wird?

Vielen Dank und Grüße!
THETREE

```typoscript
temp.NAVIGATION = HMENU
temp.NAVIGATION.1 = GMENU_LAYERS
temp.NAVIGATION.1 {
   layerStyle = position: absolute; left: 50%; margin-left: -315px; width: 172px; visibility: hidden
#   layerStyle = position: absolute; width: 172px; visibility: hidden
   xPosOffset = 0
   yPosOffset = -288
   lockPosition = y
   expAll = 1
   NO {
      allWrap = <tr><td style="width: 172px; height: 28px">|</td></tr>
      ATagParams = class="navigation"
      XY = 172, 28
      5 = IMAGE
      5.file {
         import = uploads/media/     
         import.listNum = 0
         import.override.field = media
         }
      10 = TEXT
      10.text.field = title
      10.offset = 10,17
      10.fontSize = 12
      10.fontFace = fileadmin/templates/fonts/ucr.ttf
      10.fontColor = #FFFFFF
      10.niceText = 1
   }
   RO < .NO
   RO = 1
   RO {
      10.fontColor = #000000
   }
}

temp.NAVIGATION.2 = GMENU_LAYERS
temp.NAVIGATION.2 {
   layerStyle = position: absolute; left: 50%; margin-left: -143px; width: 172px; visibility: hidden
   xPosOffset = 0
   yPosOffset = -288
   lockPosition = y
   expAll = 1
   NO {
      XY = 172, 20
      5 = IMAGE
      5.file {
         import = uploads/media/     
         import.listNum = 0
         import.override.field = media
         }
      10 = TEXT
      10.text.field = title
      10.offset = 5,15
      10.fontSize = 11
      10.fontFace = fileadmin/templates/fonts/ucr.ttf
      10.fontColor = #FFFFFF
      10.niceText = 1
   }
   RO < .NO
   RO = 1
   RO {
      10.fontColor = #000000
   }
}
```

## Beste Antwort

**Unbekannter Benutzer** · 2008-04-14 · [Beitrag #2](https://www.typo3.net/d/74226-problem-bei-positionierung-von-gmenu-layer/2)

Habe mein Problem jetzt selbst gelöst.

Hier das Ergebnis:

```typoscript
# >MARK: NAVIGATION< #
page.includeLibs.gmenu_layers = typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php

temp.NAVIGATION = HMENU
temp.NAVIGATION.1 = GMENU_LAYERS
temp.NAVIGATION.1 {

// ANMERKUNG: Die erste Ebene habe ich von der Mitte aus fest platziert.
// Die folgenden Ebenen orientieren sich dann an dieser!

   layerStyle = position: absolute; left: 50%; margin-left: -315px; width: 172px; visibility: hidden
   xPosOffset = 0
   yPosOffset = -180
   lockPosition = y
   expAll = 1

   NO {
      XY = 172, 28
      5 = IMAGE
      5.file {
         import = uploads/media/     
         import.listNum = 0
         import.override.field = media
         }
      10 = TEXT
      10.text.field = title
      10.offset = 10,17
      10.fontSize = 12
      10.fontFace = fileadmin/templates/fonts/ucr.ttf
      10.fontColor = #FFFFFF
      10.niceText = 1
   }

   RO < .NO
   RO = 1
   RO {
      10.fontColor = #000000
   }

   ACT < .NO
   ACT = 1
   ACT {
      10.fontColor = #000000
   }
}

temp.NAVIGATION.2 = GMENU_LAYERS
temp.NAVIGATION.2 {
   layerStyle = position: absolute; width: 172px; visibility: hidden
   relativeToTriggerItem = 1
   relativeToParentLayer = 1
   relativeToTriggerItem.addWidth = 1
   expAll = 1

   NO {
      XY = 172, 20
      5 = IMAGE
      5.file {
         import = uploads/media/     
         import.listNum = 0
         import.override.field = media
         }
      10 = TEXT
      10.text.field = title
      10.offset = 5,15
      10.fontSize = 11
      10.fontFace = fileadmin/templates/fonts/ucr.ttf
      10.fontColor = #FFFFFF
      10.niceText = 1
   }

   RO < .NO
   RO = 1
   RO {
      10.fontColor = #000000
   }

   ACT < .NO
   ACT = 1
   ACT {
      10.fontColor = #000000
   }
}

temp.NAVIGATION.3 < temp.NAVIGATION.2
temp.NAVIGATION.4 < temp.NAVIGATION.2
temp.NAVIGATION.5 < temp.NAVIGATION.2

page.10.marks.NAVIGATION < temp.NAVIGATION
```

## Antworten

### [#2](https://www.typo3.net/d/74226-problem-bei-positionierung-von-gmenu-layer/2) · Unbekannter Benutzer · 2008-04-14 · Beste Antwort

(Text siehe oben unter „Beste Antwort“.)

---

Quelle: „Problem bei Positionierung von GMENU_LAYER“, typo3.net, https://www.typo3.net/d/74226-problem-bei-positionierung-von-gmenu-layer
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
