[TYPO3-dev] "local" defaults for db values

Martin Kutschker masi-no at spam-typo3.org
Fri Jul 25 16:24:29 CEST 2008


Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> Martin Kutschker wrote:
>> I can set default values for visible fields per user (group) and per
>> page branch (new in 4.2). The global TCA defaults are also set only for
>> visible fields.
>>
>> But I cannot set default values different from the DB field values,
>> right?
> 
> If there are values already than defaults are not used. Or do I
> misunderstand you?

In fact there are no DB fields for the field in question. And it
wouldn't make sense to add it there.

>> I know that I can do some tricks via URL parameters of alt_doc.php, but
>> that would mean that I have to write my own UI.
>>
>> Do I have to use some TCEmain hook or am I missing the obvious?
>>
>> What I need is a way that I get some fixed values within a page tree.
>> And I want to hide the field from the users so they cannot change it.
> 
> Possibly you can do it in extTables.php. Alter 'types' for the table and
> set your own default values.

I don't want global DB defaults, be it true DB defaults or TCA defaults.
I want them to be page branch or user group dependent like TCAdefault in
pageTS/user TS. The stupid thing is that these defaults are passed on
via the "transfer" classes and deal only with the UI. This means that if
the field isn't visible it will not get a value.

Masi





More information about the TYPO3-dev mailing list