[TYPO3-english] advanced typoscript wrapping needed
Walrick
lists at globalhealingcircle.net
Wed Apr 29 17:39:50 CEST 2009
As promised my new TS.
A lot of the public page and CT page bits are the same. Could have
combined some of this, but decided not to. This gives a better overview
and allows for later changes.
Also note that the closing </div> for the container which is opened in
temp.PageAccess is as before closed in my HTML template. Could have put
it in the TS, but that just adds extra code without any actual benefit.
One difference with my previous solution regarding to the endresult is
that "To Top" links now fall outside the public/membersonly/ctonly
containers, whereas before they were inside. Not an important difference
but still. (Before the closing </div> was part of the wrap, now it's
postCObject).
Regards,
Walrick
--
# Default
temp.PageAccess = TEXT
temp.PageAccess.value = <div class="publicpage">
temp.MainContentWrap = TEXT
temp.MainContentWrap.value = <div class="public">
# Public Page
[globalVar = TSFE:page|fe_group = ,TSFE:page|fe_group =
0,TSFE:page|fe_group = -1]
temp.MainContentWrap = COA
temp.MainContentWrap {
10 = TEXT
10.value = <div class="public">
10.if {
value = -2,1,2
isInList.field = fe_group
negate = 1
}
20 = TEXT
20.value = <div
class="membersonlytext">{$text.contentmembersonly}</div><div
class="membersonly">
20.if {
value = -2,1
isInList.field = fe_group
}
30 = TEXT
30.value = <div class="ctonlytext">Coordination Team Only</div><div
class="ctonly">
30.if {
value = 2
equals.field = fe_group
}
}
[END]
# Members-Only Page
[globalVar = TSFE:page|fe_group = -2,TSFE:page|fe_group = 1] &&
[usergroup = 1,2]
temp.PageAccess = TEXT
temp.PageAccess.value = <div
class="membersonlytext">{$text.pagemembersonly}</div><div
class="membersonlypage">
temp.MainContentWrap = COA
temp.MainContentWrap {
10 = TEXT
10.value = <div class="public">
10.if {
value = 2
isInList.field = fe_group
negate = 1
}
30 = TEXT
30.value = <div class="ctonlytext">Coordination Team Only</div><div
class="ctonly">
30.if {
value = 2
equals.field = fe_group
}
}
[END]
# CT-Only Page
[globalVar = TSFE:page|fe_group = 2] && [usergroup = 2]
temp.PageAccess = TEXT
temp.PageAccess.value = <div class="ctonlytext">Coordination Team Only
Page</div><div class="ctonlypage">
temp.MainContentWrap = COA
temp.MainContentWrap {
10 = TEXT
10.value = <div class="public">
10.if {
value = -2,1,2
isInList.field = fe_group
negate = 1
}
20 = TEXT
20.value = <div
class="membersonlytext">{$text.contentmembersonly}</div><div
class="membersonly">
20.if {
value = -2,1
isInList.field = fe_group
}
30 = TEXT
30.value = <div class="ctonlytext">Coordination Team Only</div><div
class="ctonly">
30.if {
value = 2
equals.field = fe_group
}
}
[END]
temp.MainContent < styles.content.get
temp.MainContent.renderObj.stdWrap.wrap = <div class="content-unit">|</div>
temp.MainContent.renderObj.stdWrap.stdWrap.preCObject < temp.MainContentWrap
temp.MainContent.renderObj.stdWrap.stdWrap.postCObject = HTML
temp.MainContent.renderObj.stdWrap.stdWrap.postCObject.value = </div>
--
webmaster Global Healing Circle
www.globalhealingcircle.net
More information about the TYPO3-english
mailing list