[TYPO3-english] Check if an area doesn't contain elements

Tyler Kraft tyler.kraft at netefficiency.co.uk
Wed Dec 16 11:21:06 CET 2009


Hi

I actually don't know what your asking. What lib.content?



Jeppe Donslund wrote:
> Hi Tyler
> 
> Yes it does.
> But if I would like to use the area which should be checked for content 
> as an area for content elements in templaVoila I can't ude the 
> lib.content can I?
> 
> 
> 
> Tyler Kraft skrev:
>> Hi,
>>
>> Does this work?
>>
>> lib.element1 = COA
>> lib.element1 {
>>     stdWrap.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
>>     # get the page content in some manner, either using CSC, content 
>> object, a record object, etc
>>     10 < styles.content.get
>>     10.stdWrap.ifEmpty.cObject = RECORDS
>>     10.stdWrap.ifEmpty.cObject{
>>         dontcheckPid = 1
>>         tables = tt_content
>>         source = 49
>>     }
>> }
>>
>>
>>
>> Jeppe Donslund wrote:
>>> Hi.
>>>
>>> I still have this question. I didn't finde anything useful.
>>>
>>> I just wna<!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end--> t to know 
>>> how to find out if there are any element at the page. If not. Take 
>>> lement with pageid 47.
>>>
>>> Regards
>>>
>>> Jeppe D.
>>>
>>>
>>> Jeppe Donslund skrev:
>>>
>>>
>>>> I have fund this
>>>>
>>>> 10 = COA
>>>>     10 {
>>>>     #10 = TEXT
>>>>     #10.value = This is the default content
>>>>     10 = RECORDS
>>>>        10.dontcheckPid = 1
>>>>        10.tables = tt_content
>>>>        10.source = 54
>>>>     10.if.isTrue.current = 1
>>>>     10.if.negate = 1
>>>>         20 = RECORDS
>>>>     20.source.current=1
>>>>     20.tables = tt_content
>>>>     20.stdWrap.if.isTrue.current = 1
>>>>         wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
>>>>     }
>>>>
>>>> It takes the content from Global elements but it doesn't show the 
>>>> content from the actual page if it is present.
>>>>
>>>> Is this the right way?
>>>>
>>>> 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