[TYPO3-templavoila] Removing content elements on conditions

S. Teuber traveler_in_time at gmx.net
Sun Jun 10 18:24:23 CEST 2007


Hi there,

without using TV, it is possible to hide all content elements except one 
based on a Typoscript condition, like this:

[globalVar = GP:tx_myext_pi1|singleView > 0]
    styles.content.get >
    styles.content.get < plugin.tx_myext_pi1
[global]


With TV, however, it's not that simple. I tried something like this:

<field_content type="array">
	<tx_templavoila type="array">
		<title>Content</title>
		<description>Map to main content area</description>
		<sample_data type="array">
			<numIndex index="0">[Content]</numIndex>
		</sample_data>
		<eType>ce</eType>
		<TypoScript><![CDATA[

        [globalVar = GP:tx_myext_pi1|singleView > 0]
            10 < plugin.tx_myext_pi1
        [else]
	    10= RECORDS
	    10.source.current=1
	    10.tables = tt_content
	    10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
        [global]

                 ]]></TypoScript>
		<oldStyleColumnNumber type="integer">0</oldStyleColumnNumber>
	</tx_templavoila>

But since the TypoScript inserted here is applied to every single content 
item, not the "column" as a whole, this will render the output of 
tx_myext_pi1 for every content item in this column. Additionally, the 
headlines of the content elements get printed although they are not 
outputted by tx_myext_pi1.

Question:
a) how can I supress the headers
b) is it possible to disable all content elements in a "column" and 
replacing them with a single instance of any plugin?

Any help is appreciated,

Sven


More information about the TYPO3-project-templavoila mailing list