[TYPO3-german] automatische templatewahl mit automaketemplate
g. schoellkopf
g-s at g-s.ch
Mon Jun 15 14:26:42 CEST 2015
hallo
ich habe ein Problem mit der automatischen template Auswahl. den script habe ich auf einer aktuellen seite für die Auswahl der Stylesheets, wollte das jetzt aber für die Extension automaketemplate zur templatewahl benutzen. da ich mich nicht gut auskenne bei typoscript wollte ich fragen ob mir jemand helfen kann, das Problem ist, dass ich "plugin.tx_automaketemplate_pi1.content.file.override.cObject.value" mit dem betreffenden template-file text befüllen will.
plugin.tx_automaketemplate_pi1 {
content = FILE
content.file = fileadmin/responsive-neu/folgeseite-1sp.html
relPathPrefix = fileadmin/responsive-neu/
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEAD
HEAD.rmTagSections = title
NAV.all = 1
NAV.all.subpartMarker = NAVCONTAINER
DIV.id.content_typo3 = 1
DIV.id.content_typo3.subpartMarker = CONTENT
DIV.id.spalte_rechts = 1
DIV.id.spalte_rechts.subpartMarker = SPALTE_RECHTS
}
}
#plugin.tx_automaketemplate_pi1.content.file = fileadmin/responsive-neu/folgeseite-1sp.html
#plugin.tx_automaketemplate_pi1.content.file.override.cObject = TEXT
#plugin.tx_automaketemplate_pi1.content.file.override.cObject.value = fileadmin/responsive-neu/folgeseite-2sp.html
#plugin.tx_automaketemplate_pi1.content.file.override.cObject.if.isTrue{
#numRows <styles.content.getRight
#}
plugin.tx_automaketemplate_pi1.content.file.override.cObject = TEXT
plugin.tx_automaketemplate_pi1.content.file.override.cObject.value {
20 = COA
20 {
if.isTrue.numRows < styles.content.getRight
20 = TEXT
20.value = fileadmin/responsive-neu/folgeseite-2sp.html
20.if.value = 2
20.if.equals.data = register:hasSub
50 < .20
50.value = fileadmin/responsive-neu/folgeseite-32sp.html
50.if.value = 1
60 < .20
60.value = fileadmin/responsive-neu/folgeseite-3sp.html
60.if.value = 0
}
30 = COA
30 {
if.isFalse.numRows < styles.content.getRight
30 = TEXT
30.value = fileadmin/responsive-neu/folgeseite-1sp.html
30.if.value = 2
30.if.equals.data = register:hasSub
70 < .30
70.value = fileadmin/responsive-neu/folgeseite-32sp.html
70.if.value = 1
80 < .30
80.value = fileadmin/responsive-neu/folgeseite-3sp.html
80.if.value = 0
}
}
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_BODY
subparts.CONTENT < styles.content.get
subparts.SPALTE_RECHTS < styles.content.getRight
}
temp.headTemplate = TEMPLATE
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEAD
}
page.10 < temp.mainTemplate
page.headerData.10 < temp.headTemplate
page.headerData.20 = TEXT
page.10.marks{
menu= HMENU
menu {
entryLevel = 1
1 = TMENU
1 {
noBlur = 1
expAll = 0
stdWrap.prepend = LOAD_REGISTER
stdWrap.prepend.hasSub = 1
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li class="links1a">|</li>
#NO.ATagParams = class="links1a"
NO.ATagParams = class="x{field:uid}"
NO.ATagParams.insertData = 1
NO.ATagTitle.field = abstract // description // subtitle // title
ACT = 1
ACT.linkWrap = <li class="links1b">|</li>
#ACT.ATagParams = class="links1b"
ACT.ATagTitle.field = abstract // description //subtitle // title
}
2 = TMENU
2 {
noBlur = 1
expAll = 0
NO.wrapItemAndSub = <li class="links2a">|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.linkWrap = <li class="links2b">|</li>
ACT.ATagTitle.field = abstract // description // title
IFSUB = 1
IFSUB.wrapItemAndSub = <li class="menuparent">|</li>
ACTIFSUB < .IFSUB
ACTIFSUB.wrapItemAndSub = <li class="menuparent-act">|</li>
}
}
menu2 = HMENU
menu2 {
entryLevel = 3
stdWrap.prepend = LOAD_REGISTER
stdWrap.prepend.hasSub = 2
stdWrap.wrap = <div id="menu2">|</div>
stdWrap.required = 1
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li class="links1a">|</li>
#NO.ATagParams = class="links1a"
NO.ATagParams = class="x{field:uid}"
NO.ATagParams.insertData = 1
NO.ATagTitle.field = abstract // description // subtitle // title
ACT = 1
ACT.linkWrap = <li class="links1b">|</li>
#ACT.ATagParams = class="links1b"
ACT.ATagTitle.field = abstract // description //subtitle // title
}
2 = TMENU
2 {
noBlur = 1
expAll = 0
NO.wrapItemAndSub = <li class="links2a">|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.linkWrap = <li class="links2b">|</li>
ACT.ATagTitle.field = abstract // description // title
}
3 = TMENU
3 {
noBlur = 1
expAll = 0
NO.wrapItemAndSub = <li class="links3a">|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.linkWrap = <li class="links3b">|</li>
ACT.ATagTitle.field = abstract // description // title
}
4 = TMENU
4 {
noBlur = 1
expAll = 0
NO.wrapItemAndSub = <li class="links4a">|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.linkWrap = <li class="links4b">|</li>
ACT.ATagTitle.field = abstract // description // title
}
}
}
}
More information about the TYPO3-german
mailing list