Zum Inhalt springen

Problem bei Positionierung von GMENU_LAYER

Erstellt am 27. Februar 2008 · 1 Antwort · letzte Antwort am 14. April 2008

Tags: Frage

Unbekannter Benutzer ·

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

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
   }
}
Unbekannter Benutzer · · Beste Antwort

Habe mein Problem jetzt selbst gelöst.

Hier das Ergebnis:

# >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