[TYPO3-english] Check if an area doesn't contain elements
Jeppe Donslund
jd at webmasters.dk
Wed Nov 25 09:50:26 CET 2009
Hi Peter
I think what I need is the opposite of what would wrote
if.isTrue.numRows {
Does the area contain elements with PID from the actual page, show it.
} else {
Get the elements from the Global elements folder
}
Or maybe your code does that?
Jeppe
Peter Klein skrev:
> Hi Jeppe. You can use the "numRows" property to test if a DB lookup
> returns something or not.
>
> if.isTrue.numRows {
> table = tt_content
> select {
> pidInList = [ID OF PAGE WITH CE ELEMENT]
> where = uid=49
> }
> }
>
>
> --
> Peter Klein
>
> On Tue, 24 Nov 2009 09:44:26 +0100, Jeppe Donslund <jd at webmasters.dk>
> wrote:
>
>> Hi,
>>
>> I would like to know if it is possible to check wether an area contains
>> elements or not.
>> I have 3 elements in the bottom of my page. The user can but content in
>> these elements but if they leave it empty on a page TYPO3 should use
>> content from an other page using this TypoScript:
>>
>> lib.element1 = COA
>> lib.element1 {
>> 10 = RECORDS
>> 10.dontcheckPid = 1
>> 10.tables = tt_content
>> 10.source = 49
>> }
>>
>> I guess this is possible, I just don't know where to look for it :-)
>>
>> Regards
>> Jeppe Donslund
More information about the TYPO3-english
mailing list