Closed christianromeni closed 8 years ago
That is not possible, because a standardField
stores the data in the database column of the same name. So the two fields would overwrite each other.
But a headline field can be created easily without being a standardField
:
'subheadline' => array(
'label' => &$GLOBALS['TL_LANG']['tl_content']['headline'],
'inputType' => 'inputUnit',
'options' => array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'),
'eval' => array('maxlength' => 200),
),
Yep.. I know that... And I took a simple field to demonstrate. But lets just think I want to add the imageSize that is used in any regular DCA... Then I would need to copy it for every image I want to size in rsce.
But If I just say: this field here in rsce: 'thumbnail_size' will inherit all the settings from the standard field "imageSize". Then I dont have to copy the whole dca part. I'll just let the field know what options it should have.
I think we missunderstood each other :-)
I think this should be possible with:
'subheadline' => $GLOBALS['TL_DCA']['tl_content']['fields']['headline'],
Ahh...... clever...... Yep.. That is a nice one 👍 I'll test it.
Sorry to open this up again, but is it also possible to manipulate the array ($GLOBALS['TL_DCA']['tl_content']['fields']['headline'])? In this example I would like to change the options so that h1 is not included..
Yes, since the config files are regular PHP files, you can do whatever you want in them.
It would be awesome if it could be possible to create a standardField with a different name. For example:
What do you think?