Ich habe 2 Templates: eines mit 2 Spalten und eines mit 3 Spalten.
Es soll je nachdem ob die linke Spalte Inhalt hat oder nicht das 2 oder 3spaltige Template ausgewählt werden.
Ob die linke Spalte Inhalt hat oder nicht definiert sich aber aus 2 Bedingungen:
1. Es gibt kein Unterseiten (also kein Menü Level 2)
2. Es wurde in der linken Spalte kein Content angelegt.
Nach langem Suchen und TS zusammen flicken bin ich auf die Lösung unten gekommen.
Die ist zwar umständlich, aber es geht solange ich mich im Menü auf Level:1 oder darunter befinge. Wenn ich aber auf dem Menü-Level:0 bin dann wird mir das 3spaltige Template augewählt. Das darf aber nicht sein.
Ich weis leider nicht wie ich die zusätzlich Bedingung da noch einbauen kann.
Hat jemand eine Idee?
temp.mainTemplate = COA
temp.mainTemplate {
10 = COA
10 {
if.isTrue.numRows < styles.content.getLeft
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/template/theme_3columns.html
workOnSubpart = DOCUMENT_BODY
subparts {
urlpic < temp.urlpic
headerpic < temp.headerpic
navigation < temp.navigation
navigation2 < temp.navigation2
userteaser < temp.10
userMenu < temp.userMenu
register < temp.register
imprint < temp.imprint
leftTeaserbar = CONTENT
leftTeaserbar {
table = tt_content
select.orderBy = sorting
select.where = colPos=1
#renderObj.stdWrap.wrap = <div class="boxTeaserSingle">|</div><div><table style="width:100%; height:14px;"><tr><td><hr style="margin-top:7px;" /></td><td style="background-image: url(fileadmin/template/img/hr_logo_dievolkspartei.gif); background-repeat:no-repeat; width:25px;"></td><td><hr style="margin-top:7px;" /></td></tr></table></div>
}
rightTeaserbar = CONTENT
rightTeaserbar {
table = tt_content
select.orderBy = sorting
select.where = colPos=2
#renderObj.stdWrap.wrap = <div class="boxTeaserSingle">|</div><div><table style="width:100%; height:14px;"><tr><td><hr style="margin-top:7px;" /></td><td style="background-image: url(fileadmin/template/img/hr_logo_dievolkspartei.gif); background-repeat:no-repeat; width:25px;"></td><td><hr style="margin-top:7px;" /></td></tr></table></div>
}
content = CONTENT
content {
table = tt_content
select.orderBy = sorting
select.where = colPos=0
renderObj.stdWrap.wrap = <div class="boxTeaserSingle">|</div><div><table style="width:100%; height:14px;"><tr><td><hr style="margin-top:7px;" /></td><td style="background-image: url(fileadmin/template/img/hr_logo_dievolkspartei.gif); background-repeat:no-repeat; width:25px;"></td><td><hr style="margin-top:7px;" /></td></tr></table></div>
parseFunc.makelinks.http.wrap = URL-starts | URL-ends
}
}
}
}
20 = COA
20 {
if.isFalse.numRows < styles.content.getLeft
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/template/theme_2columns.html
template.file.override.cObject = TEXT
template.file.override.cObject.value = fileadmin/template/theme_3columns.html
template.file.override.cObject.if.isTrue {
numRows {
table = pages
select.pidInList.data = leveluid:1
}
}
workOnSubpart = DOCUMENT_BODY
subparts {
urlpic < temp.urlpic
headerpic < temp.headerpic
navigation < temp.navigation
navigation2 < temp.navigation2
userteaser < temp.10
userMenu < temp.userMenu
register < temp.register
imprint < temp.imprint
leftTeaserbar = CONTENT
leftTeaserbar {
table = tt_content
select.orderBy = sorting
select.where = colPos=1
#renderObj.stdWrap.wrap = <div class="boxTeaserSingle">|</div><div><table style="width:100%; height:14px;"><tr><td><hr style="margin-top:7px;" /></td><td style="background-image: url(fileadmin/template/img/hr_logo_dievolkspartei.gif); background-repeat:no-repeat; width:25px;"></td><td><hr style="margin-top:7px;" /></td></tr></table></div>
}
rightTeaserbar = CONTENT
rightTeaserbar {
table = tt_content
select.orderBy = sorting
select.where = colPos=2
#renderObj.stdWrap.wrap = <div class="boxTeaserSingle">|</div><div><table style="width:100%; height:14px;"><tr><td><hr style="margin-top:7px;" /></td><td style="background-image: url(fileadmin/template/img/hr_logo_dievolkspartei.gif); background-repeat:no-repeat; width:25px;"></td><td><hr style="margin-top:7px;" /></td></tr></table></div>
}
content = CONTENT
content {
table = tt_content
select.orderBy = sorting
select.where = colPos=0
renderObj.stdWrap.wrap = <div class="boxTeaserSingle">|</div><div><table style="width:100%; height:14px;"><tr><td><hr style="margin-top:7px;" /></td><td style="background-image: url(fileadmin/template/img/hr_logo_dievolkspartei.gif); background-repeat:no-repeat; width:25px;"></td><td><hr style="margin-top:7px;" /></td></tr></table></div>
parseFunc.makelinks.http.wrap = URL-starts | URL-ends
}
}
}
}
}