0

In TYPO3, is it possible to remove backend_layouts via page TSconfig that have been created with Mask extension.

Let's say, the following backend_layouts have been created with Mask (Name [ID]):

A [1]
B [2]

Then, I set the following in page TSconfig:

TCEFORM {
    pages {
        backend_layout {
            removeItems = 1,2
        }
    }
}

Also with this configuration, backend_layouts 'A' and 'B' are still available in page edit form.

How could I remove backend_layouts from page edit form for single pages via page TSconfig?

Mask version: 2.1.1 (TYPO3 7.6.x)

chrisfish
  • 21
  • 2

1 Answers1

0

If possible at all I would expect the layout names instead of numbers. Be aware that these names might have prefixes if the layout gets provided with a data-provider.

In the beginning (TYPO3 version < 6.2) the values for the fields backend_layout and backend_layout_next_level were numbers, as they referenced records of the table backend_layout.
But then the possibility to define BE-Layouts in TSconfig was introduced (data-provider). And for unique identification the field was changed to text (varchar) and the layouts defined by TSconfig get a automatic prefix pagets_ (prefix to the name defined in the TSconfig).


Adding or removing single options from a select can be done for selects based on static options in the TCA.
Dynamic selects (e.g. based on records) probably needs a 'wizard' to filter entries.


trying the reverse:
if you can define your backend_layouts in TSconfig it would be easy to drop some definitions in special trees.

  1. do you really need mask to render the frontend? (connecting backend_layout values to fluid templates is easy and can be found around the net)
  2. maybe even mask can handle backend_layouts defined in TSconfig
Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • I could not verify that using layout names instead of numbers would work. And I only see ids referenced at other records than the backend_layout table itself. – chrisfish Dec 19 '18 at 07:40
  • Thank you for clarifying your answer. Nevertheless, at least Mask 2.1.1 stores the backend layouts in the database table `backend_layout` which are then referenced via number IDs in the fields `backend_layout` and `backend_layout_next_level`. – chrisfish Dec 19 '18 at 11:57
  • you are right: the records are identified by numbers (the usual `uid`), but the fields are strings to hold possible configurations of dataproviders. one of these dataproviders is the core to enable layout configuration in TSconfig. I think the main problem would be the topic I mentioned in the last paragraph: you have a select based on data records (real and virtual), though in your case it's only real records – Bernd Wilke πφ Dec 19 '18 at 12:35
  • Ok, to summarize, if I understand you right, there is no straight-forward answer for my problem? – chrisfish Dec 20 '18 at 11:43
  • Sorry. I can not find an easy solution. But I'm not deep enough in the core to identify the responsible code and to analyze it for possibilities. You could simplify your question and drop the mentioning of mask as it is not involved in the selection of the backend-layouts. (the mentioning of mask lead me into a dead end). State clearly you use `backend_layout` records. as additional questions pop up I added them to my answer. – Bernd Wilke πφ Dec 20 '18 at 13:02
  • I cannot drop mask in my question, because it somehow makes a difference. `backend_layout`records that have been created manually (without mask) can be removed with page TSconfig, but not those, created with mask. mask is the main subject that made me ask the question. Thank you nevertheless. – chrisfish Jan 04 '19 at 10:46