Feature #37208

Introduce backend layout data providers

Added by Arno Dudek almost 7 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2012-05-16
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

Would be cool to have a pageTSconfig for backend_layouts like for gridelements (#31046, #35670)


Related issues

Related to TYPO3 Core - Task #37663: Change backend_layout and backend_layout_next_level from int to varchar for feature Closed 2012-06-01
Related to TYPO3 Core - Bug #52862: Backend layout icons missing in page properties Closed 2013-10-15
Related to TYPO3 Core - Bug #52953: configured Backend-Layout icons are not displayed Closed 2013-10-18
Related to TYPO3 Core - Feature #53369: Make it possible to define backend user rights via (TypoScript) files Rejected 2013-11-06
Precedes TYPO3 Core - Feature #39027: Move default layout in page module to a backend_layout Closed 2012-07-17
Follows TYPO3 Core - Feature #24060: Implement a Grid View + wizard to enable the backend layout to be adapted to the frontend look and feel Closed 2010-11-15

Associated revisions

Revision a5697586 (diff)
Added by Oliver Hader over 5 years ago

[FEATURE] Introduce backend layout data providers

Backend layouts are currently stored in the database as
regular records. Since extension cannot ship their specific
backend layout definitions, data providers become handy in
providing the accordant information taken from e.g. static
files in the file system.

Data providers can be registered like shown in the follow and
need to be implement DataProviderInterface of the namespace
TYPO3\CMS\Backend\View\BackendLayout:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']
['BackendLayoutDataProvider'][$_EXTKEY] = 'Classname';

A DataProviderContext object is used to transport submitted
data (e.g. table or field name) to the accordant data providers.

Change-Id: I2e3d39e720c6d1bffa9a586148f0eea4cab0210e
Resolves: #37208
Documentation: #52809
Releases: 6.2
Reviewed-on: https://review.typo3.org/11804
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

History

#1 Updated by Steffen Gebert almost 7 years ago

  • Category set to TypoScript
  • Status changed from New to Needs Feedback

Hi Arno,

you already have a patch for gridelements. Could you create one for TYPO3 Core, too?

Yours
Steffen

#2 Updated by Arno Dudek almost 7 years ago

Hi! I'll try it. For which T3 version? 4.7?

#3 Updated by Philipp Gampe almost 7 years ago

For master branch (6.0) as this is a new feature.

Please have a look here: http://wiki.typo3.org/Contribute_Walkthrough

#4 Updated by Arno Dudek almost 7 years ago

Can sombody help me with git, please?
I'm using Aptana with EGit.

I've succeeded with TYPO3_4-7-0.

But I can't see the tag "TYPO3_6-0-0alpha1" like in the repository (http://forge.typo3.org/projects/typo3v4-core/repository/show?rev=TYPO3_6-0-0alpha1).

#5 Updated by Arno Dudek almost 7 years ago

Patch I055810ec19c2b1cde7a00f8703d6810264fab1ff pushed to review
https://review.typo3.org/#/c/11701/

#6 Updated by Arno Dudek almost 7 years ago

Usage:

tx_cms_backendlayout {
    # If this option set the record configuration will override the TSconfig.
#    overruleRecords = 1
    # Comma seperated list of layout IDs to exclude.
#    exclude = 1,layoutC2313

    setup {
        # UID or record UID of the backend layout.
        layoutC2313 {
            title = Page C2313
            description = Page with a 2/3 and 1/3 column
            icon = 
            config {
                colCount = 2
                rowCount = 1
                rows {
                    1 {
                        columns {
                            1 {
                                name = ..Left..
                                colPos = 0
                            }
                            2 {
                                name = ..Right..
                                colPos = 2
                            }
                        }
                    }
                }
            }
        }
    }
}

#7 Updated by Arno Dudek almost 7 years ago

To use IDs like "layoutC2313" it's necessary to change the fields backend_layout and backend_layout_next_level to varchar.

#8 Updated by Georg Ringer almost 7 years ago

2 things

- I don't like changing the uid to varchar inside a topic called "tsconfig". please make a seperate issue for that as I am quite sure there are some queries which need then to be checked a bit different?

- I don't really get what this change does. which tsconfig can be changed? can you give some real world examples? thx a lot

#9 Updated by Arno Dudek almost 7 years ago

@changing the uid
#37663

@examples
I just use the gridelements together with an own extension that supports some recurrent features like two, or three columns. Also sliders can be realized by gridelements for better usability (no seperate record storage needed).
For backend layouts this are layouts with two columns and a feature area for example. So I just install the extension and have at once all usable layouts and does not have to create records first.
For this it is usefull to have static and readable UIDs like "contentGroupThreeColumns" for gridelements or "layoutC2313" for backend layouts. Cause the record UID can change from one installation to the other.
But you can use records anyway.

To use this feature just copy and paste the example above into the field "TypoScript Configuration", "Page TSConfig" of a page. (This is a simple real world example. ;) )

#10 Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11804

#11 Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11804

#12 Updated by Gerrit Code Review almost 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11804

#13 Updated by Gerrit Code Review almost 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11804

#14 Updated by Gerrit Code Review almost 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11804

#15 Updated by Gerrit Code Review almost 7 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11804

#16 Updated by Alexander Opitz almost 6 years ago

Hi Arno,

are you willing to rebase this patch for latest master?

#17 Updated by Ingo Renner almost 6 years ago

I think this makes a lot of sense, allowing us to move even more configuration to files. I might take care of rebasing the change.

#18 Updated by Arno Dudek almost 6 years ago

Alexander Opitz wrote:

are you willing to rebase this patch for latest master?

Hi all!
Yes, I'm gladly do it, if the disscussion have ended.

#19 Updated by Jo Hasenau over 5 years ago

Already on it - patchset will follow shortly ;-)

#20 Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#21 Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#22 Updated by Gerrit Code Review over 5 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#23 Updated by Gerrit Code Review over 5 years ago

Patch set 10 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#24 Updated by Gerrit Code Review over 5 years ago

Patch set 11 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#25 Updated by Gerrit Code Review over 5 years ago

Patch set 12 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#26 Updated by Gerrit Code Review over 5 years ago

Patch set 13 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#27 Updated by Gerrit Code Review over 5 years ago

Patch set 14 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#28 Updated by Gerrit Code Review over 5 years ago

Patch set 15 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#29 Updated by Jigal van Hemert over 5 years ago

At the code sprint in Essen we had a discussion about this feature with Ernesto, Oliver, Steffen R. and me. The result was that a slightly different solution would suite the future themes extension and possibly other extensions.
The core will not support BE layouts in TS config natively, but stick to records. The solution will be that extensions can define a data provider which will give the core information for:
- the list of available BE layouts in the page properties (each source is a separate group in the list to show the integrator where the BE layout comes from)
- the configuration of the BE layout for the Page module
Preferably the wizard may be modified to support that the configuration to edit comes from a data provider too.

This way any extension can add a way to store BE layouts. It can be stored in TSconfig, files, or anything else someone can think of.

The feature in the core should include:
- possibility for an extension to register a data provider
- change BE layout field to include information about data provider it comes from
- add info from data provider to list of BE layouts in page properties
- get BE layout configuration from data provider in Page module
- if possible: a mechanism to use the wizard on the BE layout configuration from a data provider

#30 Updated by Gerrit Code Review over 5 years ago

Patch set 16 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#31 Updated by Olivier Dobberkau over 5 years ago

By seeing this issue i wonder on how things are decided in the core team.

Can you maybe discuss this in your next core team meeting? or give a hint on how this patch can find a way into TYPO3 CMS core (maybe via hooks?)

Look at the current 30 votes in favor and try to put your objection in relation of the efforts made.

Thank you.

#32 Updated by Kay Strobach over 5 years ago

@jigal, during the discussion you heavily cared on performance.
now you want to introduce a more complicated way to do the same.
We already have a hook in the core to add TSConfig.

So please tell me / us how to proceed and how to ensure, that this is included in the next release!

@Olivier thanks a lot for taking care.

#33 Updated by Jo Hasenau over 5 years ago

After thinking about the proposal of the core team for a while, I really start to like that approach, especially since we already got most of the necessary functionality in the existing patch. :-)

If I got it right, we have to remove the "hardcoded" TSconfig part from the loadSetup methods and replace it with the mentioned dataProvider, that can be registered by extensions then. In any case we will need itemsProcFuncs to modify the selectboxes of the backend_layout, backend_layout_next_level and colPos fields, which are already there and working.
We even got the modified Singleton class, that Claus mentioned in his comments.

So I guess after implementing the dataProvider-Hook into the loadSetup method and modifiying the related methods, we should almost be there.

Please correct me as soon as possible, if necessary at all, since I will start coding more or less immediately :-)

#34 Updated by Claus Due over 5 years ago

@Jo I say "go for it!" :) I agree about the todo list and implementation, that's the way to go. The other big problems are already fixed and indeed it would be awesome to make such a DataProvider for fluidpages as well - we'll have fewer conflict possibilities than before. It's beginning to sound like a solid solution with only a tiny performance impact (and I hope that DataProvider concept will be used elsewhere in CMS, too!).

#35 Updated by Jo Hasenau over 5 years ago

@Claus, @Kay, @Jigal: Since the feature freeze for 6.2 LTS has been postponed to Oct. 15th, I think we can make use of the additional time.

We will have a Gridelements weekend as described here: http://www.startnext.de/typo3-grid-elements-2-0/blog/?bid=20897
So I think it would be a good idea to have a discussion and final decision for the best backend layout solution there as well.

Currently we've got still enough places, so anybody who would like to join, feel free to do so! :-)

Still I will try to provide a proof of concept for the data provider before that weekend.

#36 Updated by Gerrit Code Review over 5 years ago

Patch set 17 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#37 Updated by Gerrit Code Review over 5 years ago

Patch set 18 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#38 Updated by Gerrit Code Review over 5 years ago

Patch set 19 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#39 Updated by Gerrit Code Review over 5 years ago

Patch set 20 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#40 Updated by Gerrit Code Review over 5 years ago

Patch set 21 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#41 Updated by Gerrit Code Review over 5 years ago

Patch set 22 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#42 Updated by Gerrit Code Review over 5 years ago

Patch set 23 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#43 Updated by Gerrit Code Review over 5 years ago

Patch set 24 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#44 Updated by Gerrit Code Review over 5 years ago

Patch set 25 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#45 Updated by Gerrit Code Review over 5 years ago

Patch set 26 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#46 Updated by Gerrit Code Review over 5 years ago

Patch set 27 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#47 Updated by Gerrit Code Review over 5 years ago

Patch set 28 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#48 Updated by Gerrit Code Review over 5 years ago

Patch set 29 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#49 Updated by Gerrit Code Review over 5 years ago

Patch set 30 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#50 Updated by Gerrit Code Review over 5 years ago

Patch set 31 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#51 Updated by Gerrit Code Review over 5 years ago

Patch set 32 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#52 Updated by Gerrit Code Review over 5 years ago

Patch set 33 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#53 Updated by Gerrit Code Review over 5 years ago

Patch set 34 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#54 Updated by Gerrit Code Review over 5 years ago

Patch set 35 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#55 Updated by Gerrit Code Review over 5 years ago

Patch set 36 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#56 Updated by Gerrit Code Review over 5 years ago

Patch set 37 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#57 Updated by Oliver Hader over 5 years ago

  • Target version set to 6.2.0
  • Complexity set to medium

#58 Updated by Gerrit Code Review over 5 years ago

Patch set 38 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#59 Updated by Gerrit Code Review over 5 years ago

Patch set 39 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#60 Updated by Ernesto Baschny over 5 years ago

  • Subject changed from pageTSconfig for backend_layout to Introduce backend layout data providers
  • Category changed from TypoScript to Backend API

#61 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24767

#62 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24769

#63 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24769

#64 Updated by Gerrit Code Review over 5 years ago

Patch set 40 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#65 Updated by Gerrit Code Review over 5 years ago

Patch set 41 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#66 Updated by Gerrit Code Review over 5 years ago

Patch set 42 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11804

#67 Updated by Oliver Hader over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#68 Updated by Heiko Kromm over 5 years ago

Hi, will there be an example on how to use this?
I'm really confused, which is the final solution.

#69 Updated by Tobias Wollender over 5 years ago

Here is an extension which utilizes the new backend layout dataprovider.
https://github.com/georgringer/belayout_fileprovider

#70 Updated by Sebastian Schmal almost 4 years ago

and without this extension ?

can i outsourcing the backendLayouts with typoscript?

#72 Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF