Issue Feature Closed

#91835TCAdefaults set for CTypes like TCEFORM

Joe Jones 07/21/20, 18:58 updated 01/23/26, 11:04

Description

Dear TYPO3-Team,
thanks for your great work. I have two improvements as a feature request for TCAdefaults:

1. As in TCEFORM it would be great to specify a CType

TCAdefaults.tt_content.layout = 1
TCAdefaults.tt_content.types.image.layout= 2

This sets the default layout for images different to the other CTypes. This way would be a very consistent way to configure.

*2. Set TCAdefaults even for fields that are disabled*
Sometimes you would like to set e.g. different layouts via page ts but do not want the editor to change it. Att he moment TCAdefaults are only work, if the field is accessable for the editor. Maybe you could change that?

Have a good day
Martin

Reviews 1

History 58

  1. Gerrit Code Review pushed patch set 1 for main to change 74965 status New Under Review 06/20/22, 09:53

  2. Jonathan Kieling commented 06/20/22, 10:05

    Hi there,

    we would like to see this feature, too.

    We like to use page types for landing pages or other special use-cases. Most often these page types come with a certain set of default values needed (e.g. backend layout for langing pages).

    I had a bit of time the last couple of days and started on a patch for this. Let’s see how this goes. :)

    Jona

  3. Gerrit Code Review pushed patch set 2 for main to change 74965 06/20/22, 10:23

  4. Gerrit Code Review pushed patch set 3 for main to change 74965 06/20/22, 11:21

  5. Jonathan Kieling commented 12/11/23, 12:54

    Hi there,

    we are using the new content element wizard with presets to have the desired functionality. This way we can define default values for tt_content elements. This even allows for different variations of the same CType having different default values.

    https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/Mod.html#wizards

    I abandoned the pending patch.

  6. Eric Harrer commented 05/08/24, 13:24

    Jonathan Kieling wrote in #note-5:
    > This way we can define default values for tt_content elements. This even allows for different variations of the same CType having different default values.
    The new tt_content_defValues property only applies to tt_content records.

    As far as I understand, this feature request goes further. It would be nice if default values could also be set for records like pages, tx_news_domain_model_news or any other record that has more than one type under $GLOBALS['TCA'][<TABLENAME>]['types'].

    For example, I currently have the use case that I want to set a default backend_layout value for the custom pages type 200 from EXT:popup_power.

    So it would be cool to be able to do something like that:

    TCAdefaults.pages.backend_layout.types.200 = pagets__contentOnly
    TCAdefaults.pages.backend_layout_next_level.types.200 = pagets__contentOnly

    in addition to the already working TCEFORM TSconfig:

    TCEFORM.pages.backend_layout.types.200.disabled = 1
    TCEFORM.pages.backend_layout_next_level.types.200.disabled = 1
  7. Benni Mack commented and changed status Under Review Closed 01/23/26, 11:04

    Hey,

    this is finally fixed in v14 with this #107281

    Closing this issue, if you feel this is the wrong decision, let me know so I will re-open the ticket.

  8. Benni Mack changed Related to #107281 01/23/26, 11:04