[Typo3] If column empty, show column of page X
Bobby Eichholz
bob at ex-kali-bur.de
Wed Aug 10 16:09:05 CEST 2005
Hello,
I've read a lot of comments in this list but didn't find a working
solution for my problem.
I'm using a 3-column-layout, left and right columns containing small
blocks of content. These block are all the same on most of the pages.
My idea was to create a page where I add the default content into the
left and right column and including them per TS on every page. If a page
needs special content in a column, it should be added to the page
directly ignoring the default content.
I'm building the columns like this:
=====
temp.blocksLeft = CONTENT
temp.blocksLeft {
table = tt_content
select {
pidInList = this
where = colPos = 1
orderBy = sorting
}
renderObj < tt_content
renderObj {
stdWrap.wrap = |</td></tr></table>
image.20.maxW = 143
image.20.maxWInText = 143
}
styles.content.imgtext.colSpace = 0
styles.content.imgtext.rowSpace = 0
styles.content.imgtext.textMargin = 0
stdWrap.required = 1
}
=====
My idea was to replace 'stdWrap.required = 1' with
'stdWrap.ifEmty.override.pidInList = 169' where 169 is the uid of the
page with the default content (doesn't work, shows content of the column
if there is or stays empty).
Next attempt was, adding:
=====
temp.blocksLeftDefault = CONTENT
temp.blocksLeftDefault {
table = tt_content
select {
pidInList = 169
...
}
...
subparts.blocksLeft < temp.blocksLeft
subparts.blocksLeft.stdWrap.ifEmpty < temp.blocksLeftDefault
=====
This nearly works unless on the FE I now get the type of
'temp.blocksLeftDefault' (CONTENT) instead of the content itself.
Thanks
Bobby
More information about the TYPO3-english
mailing list