[TYPO3-german] TypoScript zur Generierung einer 3 Ebenen Navigation nicht perfomant
Konrad Chorosinski
konster.de at gmail.com
Tue Mar 26 22:09:45 CET 2013
Hallo liebe Liste,
es hat sich herausgestellt, dass das TypoScript zur Generierung meiner
Hauptnavigation sehr unperformant ist (Ladezeit zwischen 6 und 10
Sekunden). Kann mir jemand dabei helfen die genauen Flaschenhälse zu
identifizieren und/oder das Script zu korrigieren/optimieren?
Die Hauptnavigation generiert sich aus 3 Ebenen des Seitenbaums. Ebenen
2 und 3 werden in drei Spalten (divs) ausgegeben. Das Einteilen der
ausgegebenen Links in Spalten gelingt mir mittels Registern. Liegt es
vielleicht an ihnen?
Hier das TypoScript:
temp.Hauptnavigation = COA
temp.Hauptnavigation {
10 = HMENU
10 {
entryLevel = 0
wrap = <ul id="nav" class="dropdown dropdown-horizontal">|</ul><div
class="clr"></div>
1 = GMENU
1 {
noBlur = 1
expAll = 1
maxItems = 10
imgNameNotRandom = 1
distributeX = 655
NO = 1
NO {
XY = [10.w]+26, 35
allWrap.cObject = LOAD_REGISTER
allWrap.cObject {
# Counter for the mainmenu points
mainMenuNumber.cObject=TEXT
mainMenuNumber.cObject {
value={register:mainMenuNumber}+1
insertData=1
}
mainMenuNumber.prioriCalc=intval
# Counter for the filler
mainMenuNumberForFiller.cObject=TEXT
mainMenuNumberForFiller.cObject {
value={register:mainMenuNumber}+1
insertData=1
}
mainMenuNumberForFiller.prioriCalc=intval
# Runterzaehler Submenüeinträge
runtersub.cObject=TEXT
runtersub.cObject {
value=39
insertData=1
}
runtersub.prioriCalc=intval
}
10 = TEXT
10 {
text.field = title
offset = 14,23
fontColor = #ffffff
fontSize = {$hauptmenu.schriftgroesse}
fontFile = {$hauptmenu.schriftdatei}
}
wrapItemAndSub= <li class="item{register:mainMenuNumber} lvl1li
first">|</li> |*| <li class="item{register:mainMenuNumber}
lvl1li">|</li> |*| <li class="item{register:mainMenuNumber} lvl1li
last">|</li><li class="item{register:mainMenuNumberForFiller} filler"></li>
wrapItemAndSub.insertData = 1
backColor = #009ee0
ATagParams = class="lvl1link"
imgParams = class="frutiger"
}
RO < .NO
RO {
5 = IMAGE
5 {
file = fileadmin/Designvorlagen/hauptnavi.tif
}
}
CURIFSUB < .RO
CURIFSUB {
wrap = |<div class="bgaddon"></div>
wrapItemAndSub= <li class="item{register:mainMenuNumber} active
dir lvl1li first">|</li> |*| <li class="item{register:mainMenuNumber}
active lvl1li dir" >|</li> |*| <li class="item{register:mainMenuNumber}
active lvl1li dir last">|</li><li
class="item{register:mainMenuNumberForFiller} filler"></li>
}
CUR < .RO
CUR {
wrapItemAndSub= <li class="item{register:mainMenuNumber} active
lvl1li first">|</li> |*| <li class="item{register:mainMenuNumber} active
lvl1li">|</li> |*| <li class="item{register:mainMenuNumber} lvl1li
active last">|</li><li class="item{register:mainMenuNumberForFiller}
filler"></li>
}
CURRO < .CUR
CURRO {
}
CURIFSUBRO < .CURIFSUB
CURIFSUBRO {
}
ACTIFSUB < .RO
ACTIFSUB {
wrap = |<div class="bgaddon"></div>
wrapItemAndSub= <li class="item{register:mainMenuNumber}
activetrail dir lvl1li first">|</li> |*| <li
class="item{register:mainMenuNumber} activetrail lvl1li dir">|</li> |*|
<li class="item{register:mainMenuNumber} activetrail lvl1li dir
last">|</li><li class="item{register:mainMenuNumberForFiller} filler"></li>
}
ACT < .RO
ACT {
wrapItemAndSub= <li class="item{register:mainMenuNumber}
activetrail lvl1li first">|</li> |*| <li
class="item{register:mainMenuNumber} activetrail lvl1li">|</li> |*| <li
class="item{register:mainMenuNumber} lvl1li activetrail last">|</li><li
class="item{register:mainMenuNumberForFiller} filler"></li>
}
ACTRO < .ACT
ACTRO {
}
ACTIFSUBRO < .ACTIFSUB
ACTIFSUBRO {
}
IFSUB < .NO
IFSUB {
wrap = |<div class="bgaddon"></div>
wrapItemAndSub= <li class="item{register:mainMenuNumber} dir
lvl1li first">|</li> |*| <li class="item{register:mainMenuNumber} lvl1li
dir">|</li> |*| <li class="item{register:mainMenuNumber} lvl1li dir
last">|</li><li class="item{register:mainMenuNumberForFiller} filler"></li>
}
IFSUBRO < .RO
IFSUBRO {
wrapItemAndSub= <li class="item{register:mainMenuNumber} dir
lvl1li first">|</li> |*| <li class="item{register:mainMenuNumber} lvl1li
dir">|</li> |*| <li class="item{register:mainMenuNumber} lvl1li dir
last">|</li><li class="item{register:mainMenuNumberForFiller} filler"></li>
}
}
2 = TMENU
2 {
wrap = <div class="submenu"><div class="leftpart"><ul
class="sub">|</ul></div><div class="clr"></div></div>
noBlur = 1
expAll = 1
maxItems.stdWrap.data = register:runtersub
NO = 1
NO {
allWrap.cObject = LOAD_REGISTER
allWrap.cObject {
# Runterzaehler Submenüeinträge
runtersub.cObject=TEXT
runtersub.cObject{
value={register:runtersub}-1
insertData=1
}
runtersub.prioriCalc=intval
}
ATagParams = class="lvl2link"
allStdWrap.dataWrap = <li class="item{register:subMenuNumber}
lvl2li first">|</li> |*| <li class="item{register:subMenuNumber}
lvl2li">|</li> |*| <li class="item{register:subMenuNumber} lvl2li
last">|</li>
allStdWrap.append = COA
allStdWrap.append {
5 = TEXT
5 {
value = { register:runtersub }
insertData = 1
}
5>
10 = TEXT
10 {
value = </ul></div><div class="middlepart"><ul class="sub">
if.value.data = register:runtersub
if.equals = 26
}
20 = TEXT
20 {
value = </ul></div><div class="rightpart"><ul class="sub">
if.value.data = register:runtersub
if.equals = 13
}
}
}
SPC < .NO
SPC {
stdWrap.cObject = COA
stdWrap.cObject {
10 = TEXT
10 {
value =
}
}
}
IFSUB < .NO
IFSUB {
allStdWrap.dataWrap = <li class="item{register:subMenuNumber}
lvl2li dir first">| |*| <li class="item{register:subMenuNumber} dir
lvl2li">| |*| <li class="item{register:subMenuNumber} dir lvl2li last">|
}
CURIFSUB < .NO
CURIFSUB {
allStdWrap.dataWrap = <li class="item{register:subMenuNumber}
lvl2li dir active first">| |*| <li class="item{register:subMenuNumber}
dir active lvl2li">| |*| <li class="item{register:subMenuNumber} dir
active lvl2li last">|
}
CUR < .NO
CUR {
allStdWrap.dataWrap = <li class="item{register:subMenuNumber}
lvl2li active first">| |*| <li class="item{register:subMenuNumber}
active lvl2li">| |*| <li class="item{register:subMenuNumber} active
lvl2li last">|
}
ACTIFSUB < .NO
ACTIFSUB {
allStdWrap.dataWrap = <li class="item{register:subMenuNumber}
lvl2li dir activetrail first">| |*| <li
class="item{register:subMenuNumber} dir activetrail lvl2li">| |*| <li
class="item{register:subMenuNumber} dir activetrail lvl2li last">|
}
ACT < .NO
ACT {
allStdWrap.dataWrap = <li class="item{register:subMenuNumber}
lvl2li activetrail activeforced first">| |*| <li
class="item{register:subMenuNumber} activetrail activeforced lvl2li">|
|*| <li class="item{register:subMenuNumber} activetrail activeforced
lvl2li last">|
}
}
3 = TMENU
3 {
wrap = <ul class="subsub">|</ul></li>
expAll = 0
noBlur = 1
maxItems.stdWrap.data = {register:runtersub}
NO = 1
NO {
ATagParams = class="lvl3link"
allWrap.cObject = LOAD_REGISTER
allWrap.cObject {
# Runterzaehler Submenüeinträge
runtersub.cObject=TEXT
runtersub.cObject{
value={register:runtersub}-1
insertData=1
}
runtersub.prioriCalc=intval
}
allStdWrap.dataWrap = <li
class="item{register:subsubMenuNumber} lvl3li first">|</li> |*| <li
class="item{register:subsubMenuNumber} lvl3li">|</li> |*| <li
class="item{register:subsubMenuNumber} lvl3li last">|</li>
allStdWrap.append = COA
allStdWrap.append {
5 = TEXT
5 {
value = { register:runtersub }
insertData = 1
}
5>
10 = TEXT
10 {
value = </ul></li></ul></div><div class="middlepart"><ul
class="sub"><li class="lvl2li"><ul class="subsub">
if.value.data = register:runtersub
if.equals = 26
}
20 = TEXT
20 {
value = </ul></li></ul></div><div class="rightpart"><ul
class="sub"><li class="lvl2li"><ul class="subsub">
if.value.data = register:runtersub
if.equals = 13
}
}
}
SPC < .NO
CUR < .NO
CUR {
allStdWrap.dataWrap = <li
class="item{register:subsubMenuNumber} lvl3li active first">|</li> |*|
<li class="item{register:subsubMenuNumber} lvl3li active">|</li> |*| <li
class="item{register:subsubMenuNumber} lvl3li active last">|</li>
}
}
}
}
More information about the TYPO3-german
mailing list