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

Tapio Markula tapio.markula at xetpoint.fi
Thu Dec 17 10:16:49 CET 2009


Peter Niederlag kirjoitti:
> Hello Jeppe,
> 
> Does it work? Otherwise you are at least getting VERY close.
> 
> Jeppe Donslund schrieb:
>> Hi Loek.
> [...]
>>         <eType_EXTRA type="array">
>>             <objPath>lib.btm_elm_1</objPath>
>>         </eType_EXTRA>
> 
> Here ^^^ you configure to use an objPath
> 
>>         <TypoScript><![CDATA[
>>             lib.btm_elm_1 = COA
>>             lib.btm_elm_1 {
>>               10 = RECORDS
>>               10 {
>>                 source.current = 1
>>                 tables = tt_content
>>                 stdWrap {
>>                   required = 1
>>                   wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
>>                   ifEmpty.cObject < lib.element1
>>                 }
>>               }
>>             }
>>         ]]></TypoScript>
> 
> Now you setup the objectPath Lib.btm_elm_1' that you want to use INSIDE
> the datastructure. This might not work.
> 
> In general you either define a "local" TypoSript-Setup INSIDE the
> datastructure OR you "reference" an objPath, which then is setup inside
> a regular TypoScript template(NOT within the datastructure).
> 
> So if it does not work move the lines 'lib.btm_elm_1=COA' with
> corresponding setup to the template where you define lib.element1. Since
> you copy  lib.element1 inside lib.btm_elm_1 you have to insert it AFTER
> lib.element1.
> 
> It should work then.

I doubt that it is never possible to test, if area is empty, because the 
information is not stored in the table 'tt_content' but inside internal 
XML-document into the table 'pages'.
That makes templavoila hard to use for example in situations, where you 
want to create a menu from contents in the page and sort them.

I think you can't ever build reasonable TS template config, which relate 
with SQL queries from tt_content table.

Concerning menus you must then build your own user functions.


More information about the TYPO3-english mailing list