Hi Loek.

I have tried to put your code into my DS.

<field_bottom_element_1 type="array">
        <tx_templavoila type="array">
                <title>Bundelement 1</title>
                <sample_data type="array">
                        <numIndex index="0"></numIndex>
                </sample_data>
                <eType>ce</eType>
                <oldStyleColumnNumber type="integer">1</oldStyleColumnNumber>
                <eType_EXTRA type="array">
                        <objPath>lib.btm_elm_1</objPath>
                </eType_EXTRA>
                <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>
        </tx_templavoila>
        <TCEforms type="array">
                <label>Bundelement 1</label>
                <config type="array">
                        <type>group</type>
                        <internal_type>db</internal_type>
                        <allowed>tt_content</allowed>
                        <size>5</size>
                        <maxitems>200</maxitems>
                        <minitems>0</minitems>
                        <multiple>1</multiple>
                        <show_thumbs>1</show_thumbs>
                </config>
        </TCEforms>
</field_bottom_element_1>

Have I written it in the right place?

And the lib.element1 is define in the Template as this:

lib.element1 = COA
lib.element1 {
   10 = RECORDS
   10.dontcheckPid = 1
   10.tables = tt_content
   10.source = 47
}

Everything should be fine, or???

Jeppe



                        
Loek Hilgersom skrev:
Hi Jeppe,

What you have to do when using TemplaVoila is this:

- edit the DS of your TV template and find the part with the right 'area'. Take out the Typoscript part and replace it with this:
<TypoScript><![CDATA[
    10 < lib.field_bottomleft
]]></TypoScript>

(where field_bottomleft is the name that 'area')

- now you can fill this part from your TS templates:

lib.field_bottomleft = COA
lib.field_bottomleft {
  10 = RECORDS
  10 {
    source.current = 1
    tables = tt_content
    stdWrap {
      required = 1
      wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
      ifEmpty.cObject < lib.element1
    }
  }
}

That should do it. Of course this opens a whole new world of possibilities.... ;-)

Loek


Jeppe Donslund wrote:
Oh, I'm sorry, my mistake.

In TemplaVoila i have made an Element. The editing type is "Content Elements". It is this element I would like to check if it contains anything. If I should use your example I should make it editing type "TypoScript Object Path", right? But if I do that I can't put anything into it on the page and your code will always return content_id = 49.

Does it make any sense?

Jeppe

_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to