Feature #77842

explicitly allow CTypes for columns in backend_layout

Added by Urs Braem about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2016-09-04
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Not sure if I'm in the right category and therefore, if this is maybe a duplicate/on some list already?

I've seen there is a similar implementation in gridelements, but I think this would make a very desirable & useful little core feature: define allowed CTypes directly in the backend_layout config:

columns {
  1{
    name = Main 
    colPos = 0 
    colspan = 1
    allowedCTypes = text,textpic
  }
}

What do you think?


Related issues

Related to TYPO3 Core - Feature #7459: Filter allowed content element types by column In Progress 2010-04-25
Related to TYPO3 Core - Feature #67750: Page view > Dropdown to quick create most used content New 2015-06-25

History

#1 Updated by Sascha Egerer about 3 years ago

It's not that easy. That must be implemented on a column basis as you can change the column at multiple places. Moving content elements from one to another page could also work around that.

#2 Updated by Urs Braem about 3 years ago

For others searching for a solution: a quick way to do it with TSConfig is to disable all tabs for starters, then you can add items by colPos:

// disable all
mod.wizards.newContentElement.wizardItems.common.show =
mod.wizards.newContentElement.wizardItems.special.show =
mod.wizards.newContentElement.wizardItems.forms.show =
mod.wizards.newContentElement.wizardItems.plugins.show =
mod.wizards.newContentElement.wizardItems.mask.show =

// set individual by colPos 
// and active backend_layout: [globalVar = GP:colPos==0]&&[page|backend_layout = 0] // would be nice, but the value doesn't "slide" up the tree
[globalVar = GP:colPos==0]
  mod.wizards.newContentElement.wizardItems.common.show := addToList(header)
[end]

(most googlable solutions use removeFromList(), which will become polluted as soon as you add new content types, that's why I mention it here.

As Sascha says correctly, it's more than just replicating the TSConfig into a BE Layout setting, as you can still work around the wizard's limitations by either changing the CType later or creating elements of a "forbidden" CType in another column and moving them afterwards. While such effects may be helpful in some cases, the option in BE Layout should probably disable all of that at once. As the above solution seems to work quite well, that's probably the reason why the feature isn't really urgent. In a world with unlimited resources, it would be a plausible thing to implement though.

#3 Updated by Jo Hasenau almost 3 years ago

  • Status changed from New to Closed

Closed as duplicate of #7459

I know the issue is quite old, but I have been asked to reactivate it, so you can expect to see some progress there soon.

#4 Updated by Urs Braem almost 3 years ago

Nice!

#5 Updated by taywa gmbh over 2 years ago

this would make it easier for editors, especially on heavily customised websites. it would be even cooler if one could specify the media type(s) for textmedia content-elements

Also available in: Atom PDF