Zum Inhalt springen

GMENU - unterschiedliche Breite der Buttons

Erstellt am 14. Juli 2010 · 1 Antwort · letzte Antwort am 9. August 2010

Tags: Frage

maxxscho ·

Hallo Leute!

Ich bin ein ziemlicher Typo3-Anfänger und habe ein paar Probleme mit einem horizontalen grafischen Menü.
Es ist ein Listenmenü und grafisch deshalb, weil der Kunde eine exotische Schriftart im Menü will.
Nun, das Menü schaffe ich soweit, nur müßte sich jeder Button an den Seitentitel anpassen. Derzeit haben alle Grafiken die Maße 120*50.
Die Höhe müßte sich auf 17px beschränken, dies sollte aber kein Problem sein.
Wichtig ist die Breite, die sich an den Titel anpasst, da einige Menüpunkte sehr kurz sind und andere wiederum einen langen Titel haben.
Das TS:

temp.mainNavGraf = HMENU
temp.mainNavGraf {
  wrap = <ul> | </ul>
  1 = GMENU
  1 {
    NO {
      wrap = <li> | </li>
      10 = TEXT
      10.niceText = 1
      10.text.field = title
      10.fontFile = fileadmin/fonts/LSANSD.ttf
      10.offset = 6, 20
      10.fontColor = #009790
      10.fontSize = 12
    }
    ACT < .NO
    ACT = 1
    ACT.10.fontColor = #09276F
  }
}

Bitte um Hilfe!

LG
maxxscho

theis ·

Hallo maxxscho,

schau mal XY, da kann man rechnen (https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Gifbuilder/Properties.html)

so ca sollte es funktionieren:

temp.mainNavGraf = HMENU
temp.mainNavGraf {
  wrap = <ul> | </ul>

  1 = GMENU
  1 {
    XY = [10.w]+10 ,17

    NO {
      wrap = <li> | </li>
      10 = TEXT
      10.niceText = 1
      10.text.field = title
      10.fontFile = fileadmin/fonts/LSANSD.ttf
      10.offset = 6, 20
      10.fontColor = #009790
      10.fontSize = 12
    }
    ACT < .NO
    ACT = 1
    ACT.10.fontColor = #09276F
  }
}

Gruss
Theis