[TYPO3-dev] Conditional display for BE

Tapio Markula tapio.markula at atwebteam.com
Fri Mar 16 13:09:59 CET 2007


Dmitry Dulepov kirjoitti:
> Al Chuck wrote:
>> I want to have a conditional display for  "Edit Page Properties". by
>> which display or not display some of the form elements for shortcut
>> pages i.e doktype==4.
>>
>> I would prefer doing this on the extension without updating any of
>> the core files.
> 
> Answer depends on how you define condition.

> Generally, field visibility is defined by "types" field in TCA. Read 
> "typo3 core api" document for the description of TCA and "types".

The question was how to define those conditinal. If you define them
normal way in ext_tables.php or tca.php they are not conditional
but just reset through an extension.
And because in those files is not information about who is the user
or what is the page, you can use in those files only installation level
conditions, for example

switch($_EXTCONF['fieldTCApagesType4']) {
	CASE 0:
$TCA['pages']['types']['4']['showitem']=..

break;

	CASE 1:
$TCA['pages']['types']['4']['showitem']=...
...
}





More information about the TYPO3-dev mailing list