Project

General

Profile

Actions

Feature #91835

open

TCAdefaults set for CTypes like TCEFORM

Added by Joe Jones over 4 years ago. Updated 7 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2020-07-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
tceform tcadefaults types ctype
Complexity:
Sprint Focus:

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

Actions #1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74965

Actions #2

Updated by Jonathan Kieling over 2 years ago

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

Actions #3

Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74965

Actions #4

Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74965

Actions #5

Updated by Jonathan Kieling 12 months ago

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.

Actions #6

Updated by Eric Harrer 7 months ago · Edited

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

Actions

Also available in: Atom PDF