[TYPO3-german] Verwendung von register:count_HMENU_MENUOBJ in offset-Eigenschaft in GMENU-GIFBUILDER-Objekten
JoH
info at cybercraft.de
Fri Oct 6 02:13:27 CEST 2006
> Aber mal noch eine Frage nebenbei: wie kommt man darauf, dass offset
> die optionSplit-Eigenschaft unterstützt? *sichwundert* Es ist immer
> wieder krass zu sehen, wieviel man in der TSRef übersehen kann :/
Eigentlich ganz einfach, allerdings muß man dazu einen bestimmten Satz an
einer bestimmten Stelle gelesen haben, der (zugegeben) nicht sofort ins Auge
fällt.
<quote>
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/3/1/
If you look in this reference (see later) at the linkWrap-property of the
GMENU-object, you'll discover that all properties of .NO is parse through
optionSplit. This means that before the individual menuitems are generated,
the properties are split by this function.
</quote>
Wobei das nicht nur für GMENU sondern für alle xMENU Items innerhalb eines
HMENU gilt.
Innerhalb von NO & Co. kannst Du also wirklich _alles_ durch optionSplit
kurbeln.
Selbst das Ein-/Ausschalten von Elementen ist damit möglich:
NO {
before = TEXT || TEXT || 0 || TEXT
before {
value = Text1 || Text2 || kein Text || Text 3
}
}
}
oder auch das ummodeln von if-Abfragen
NO {
allWrap = <DIV class="whatever">|</DIV>
allWrap {
if {
value = 1 || 2 || 3 || 4 |*| 5 |*| 4 || 3 || 2 || 1
isGreaterThan.numRows {
table = pages
select {
pidInList.field = uid
}
}
}
}
}
}
Das ganze Konzept ist eines der Features von TypoScript, die TYPO3 deutlich
von der Masse der sonstigen CMS abheben, weil es speziell die Arbeit an
Menü-Layouts erheblich vereinfacht.
Richtig cool wird es aber erst dadurch, dass es auch im Bereich der stdWrap
Funktion "split" eingesetzt werden kann, denn damit kannst Du auch Dinge
außerhalb von HMENU "optionSplitten" ...
z.B.: Das erste und das letzte Element auf einer Seite in eine spezielle Box
packen, oder, oder, oder ...
Viel Spaß beim Ausprobieren ;-)
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
More information about the TYPO3-german
mailing list