[TYPO3-english] Hiding empty section
Loek Hilgersom
hilgersom at xs4all.nl
Wed Jul 22 16:43:19 CEST 2009
Hi Christian,
Try this:
- map the the right content area as OUTER.
- modify the TS part of the DS for this part to look like this:
<TypoScript><![CDATA[
10 < lib.field_contentright
]]></TypoScript>
- then put this somewhere in your TS templates setup:
lib.field_contentright = COA
lib.field_contentright {
10 = RECORDS
10 {
source.current = 1
tables = tt_content
stdWrap {
required = 1
wrap = <div id="contentright">|</div>
}
}
}
I didn't try this exactly like this, but I think it should make the div
disappear when there is no content. Then you should be able to solve it with CSS.
Hth,
Loek
Christian Tardif wrote:
> Hi all,
>
> I've been searching for this one a lot, but I can't find anything
> relevant. Maybe my search keywords are wrong, but...
>
> I have an html/css template with a global <DIV> which contains, in turn,
> two side-by-side <DIV>`s. The left one is for the Main Content Area, and
> the right one if for the Right Content Area. What I would like to do is
> hide completely (as if it doesn't exist at all) the <DIV> for the Right
> Content Area when the Right Content Area is empty, and expanding the
> left <DIV> to take all the place (left is 70% and right is 30%... when
> there is a right content).
>
> I didn't find a way to do it in CSS. Is there something that can be done
> in Typoscript? The Right Content Area is mapped as INNER, in case you'd
> like to know it.
>
> Thanks,
>
> --
> Christian...
>
More information about the TYPO3-english
mailing list