[TYPO3-english] Hiding empty section
Christian Tardif
christian.tardif at servinfo.ca
Wed Jul 22 17:12:28 CEST 2009
Loek Hilgersom wrote:
> 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.
Hi,
I just found some info on the Net (finally). While you pointed out in
the right direction, it won't work. Here is what I found:
=============================================
it looks like RECORDS does not support full stdWrap featurers.
thats what i have seen after a look in the TS-ref. but you could use a COA
to get the full stdWrap Features
<TypoScript><![CDATA[
1 =COA
1 {
stdWrap.required = 1
stdWrap.wrap = <!--TYPO3SEARCH_begin--><div
id="content_r">|</div><!--TYPO3SEARCH_end-->
10= RECORDS
10.source.current=1
10.tables = tt_content
}
]]></TypoScript>
=============================================
And it works. For the rest, you're right. I'll then be able to fix the
rest with CSS.
I don't know if this has been used very often (due to the difficulty I
had to find the answer, I would say no), but wouldn't be helpful to have
the opportunity, at mapping time, to tell that this EL is to be ripped
of when empty? Just a checkbox would do the job....
Thanks for helping me out.
--
Christian...
More information about the TYPO3-english
mailing list