[TYPO3-dev] Hide flexform field with typoscript in TSconfig

Martin Kutschker masi-no at spam-typo3.org
Mon Mar 23 14:23:44 CET 2009


Steffen Kamper schrieb:
> Hi Masi,
> 
> Martin Kutschker schrieb:
>> Steffen Kamper schrieb:
>>> Hi Masi,
>>>
>>> Martin Kutschker schrieb:
>>>>> TCEFORM.tt_content.pi_flexform./ROOT/el/what_to_display.disabled = 1
>>>> Does this work with sections? IIRC that was one of Dmitry's concerns.
>>>>
>>> it could work with sections. But it doesn't make sense to configure one
>>> array element in a section this way.
>>
>> I don't use them, so I wouldn't know ;)
>>
>> As for the syntax. Do we need the ROOT? Shouldn't we have the sheet
>> instead?
>>
>> TCEFORM.tt_content.pi_flexform./sheetname/el/fieldname.disabled = 1
>>
>> Or even simpler:
>>
>> TCEFORM.tt_content.pi_flexform.sheetname/fieldname.disabled = 1
>>
>>
> 
> i looked to some existing flexforms, sheets are optional (structure can
> start with ROOT/el).
> So i simply followed the path of the XML tags
> The beginning slash can be omitted, but could be used as "starting from
> root" and as identifier of upcoming xpath.
> 
> simplifying the syntax would add complexity to parsing, so i'm fine with
> any syntax that works exact the way it should.

I'm not so familiar with XPath. A real/full XPath should of course work.
Only if that is cumbersome we should consider an abbreviated form.

What might be a problem is that the flexform fields support the loading
of different definitions by type and subtype of the record. In theory
the same XPath could match for different forms. This may or may not been
intended by the site admin. So I think that it mus be possible to tie an
XPath to the correct (sub)type of the record.

Masi




More information about the TYPO3-dev mailing list