You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-31Lines changed: 31 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,44 +4,44 @@
4
4
5
5
## Features
6
6
- Simple amazing containers (grids) as custom TYPO3 Content Elements
7
-
- No default containers, everything will be built the way its needed for a project
7
+
- No default containers; everything will be built the way it is needed for a project
8
8
- Supports multilanguage (connected or free mode (mixed mode not supported))
9
9
- Supports workspaces
10
10
- Supports colPos-restrictions if EXT:content_defender >= 3.1.0 is installed
11
11
- Frontend Rendering via DataProcessor and Fluid templates
12
12
13
13
## Why did we create another "Grid" extension?
14
14
15
-
At b13 we've been long supporters and fans of gridelements, which we are thankful for and we used it in the past with great pleasure.
15
+
At b13, we've long supported gridelements, for which we are thankful, and have used this extension with great pleasure in the past.
16
16
17
-
However, we had our pain points in the past with all solutions we've evaluted and worked with. These are our reasons:
17
+
However, we had our pain points in the past with all the solutions we've evaluated and worked with. These are our reasons:
18
18
19
-
- We wanted an extension that works with multiple versions of TYPO3 Core with the same extension, to support our company's [TYPO3 upgrade strategy](https://b13.com/solutions/typo3-upgrades).
20
-
- We wanted to overcome issues when dealing with `colPos` field and dislike any fixed value which isn't fully compatible with TYPO3 Core.
21
-
- We wanted an extension that is fully tested with multilingual and workspaces functionality.
22
-
- We wanted an extension that only does one thing: EXT:container ONLY adds tools to create and render container elements, and nothing else. No FlexForms, no permission handling or custom rendering.
23
-
- We wanted an extension where every grid has its own Content Type (CType) making it as close to TYPO3 Core functionality as possible.
24
-
- We wanted an extension where the configuration of a grid container element is located at one single place to make creation of custom containers easy.
25
-
- We wanted an extension that has a progressive development workflow: We were working with new projects in TYPO3 v10 sprint releases and needed custom container elements and did not want to wait until TYPO3 v10 LTS.
19
+
- We wanted an extension that works with multiple versions of TYPO3 Core with the same extension to support our company's [TYPO3 upgrade strategy](https://b13.com/solutions/typo3-upgrades).
20
+
- We wanted to overcome issues when dealing with the `colPos` field and dislike any fixed value that isn't fully compatible with TYPO3 Core.
21
+
- We wanted a thoroughly tested extension with multilingual and workspaces functionality.
22
+
- We wanted an extension that only does one thing: EXT:container ONLY adds tools to create and render container elements. There are no FlexForms, no permission handling, or custom rendering.
23
+
- We wanted an extension in which every grid has its own Content Type (CType), making it as close as possible to TYPO3 Core functionality.
24
+
- We wanted an extension where the configuration of a grid container element is located in one single place, making it easy to create custom containers.
25
+
- We wanted an extension with a progressive development workflow. We were working on new projects in TYPO3 v10 sprint releases, needed custom container elements, and did not want to wait until TYPO3 v10 LTS.
26
26
27
27
## Installation
28
28
29
29
Install this extension via `composer req b13/container` or download it from the [TYPO3 Extension Repository](https://extensions.typo3.org/extension/container/) and activate
30
30
the extension in the Extension Manager of your TYPO3 installation.
31
31
32
-
Once installed, add a custom content element to your sitepackage or theme extension (see "Adding your own container element").
32
+
Once installed, add a custom content element to your site package or theme extension (see "Adding your container element").
33
33
34
-
## Adding your own container element
34
+
## Adding your container element
35
35
36
-
1. Register your custom container in your sitepackage or theme extension in `Configuration/TCA/Overrides/tt_content.php` as new Content Type
36
+
1. Register your custom container in your site package or theme extension in `Configuration/TCA/Overrides/tt_content.php` as new Content Type
37
37
2. Add TypoScript and your Fluid Template for frontend rendering
38
38
3. Add an icon in Resources/Public/Icons/`<CType>`.svg
39
39
40
40
See [EXT:container_example](https://github.com/b13/container-example) for a simple example of a custom container.
41
41
42
42
### Registration of Container Elements
43
43
44
-
This is an example to create a 2 column container. The code snippet goes into a file in your sitepackage or theme extension in the folder `Configuration/TCA/Overrides/`. The file can have any name but it is good practice to name it according to the database table it relates to. In this case this would be `tt_content.php`.
44
+
This is an example of creating a two-column container. The code snippet goes into a file in your site package or theme extension in the folder `Configuration/TCA/Overrides/`. The file can have any name, but it is good practice to name it according to the database table it relates to. In this case, this would be `tt_content.php`.
|`setGridLayoutPaths`| Layout root paths for grid |`array $gridLayoutPaths`|`[]`|
78
78
|`setSaveAndCloseInNewContentElementWizard`| saveAndClose for new content element wizard |`bool $saveAndCloseInNewContentElementWizard`|`true`|
79
-
|`setRegisterInNewContentElementWizard`|register in new content element wizard |`bool $registerInNewContentElementWizard`|`true`|
80
-
|`setGroup`| Custom Group (used as optgroup for CType select, and as tab in New Content Element Wizard). If empty "container" is used as tab and no optgroup in CType is used. |`string $group`|`'container'`|
79
+
|`setRegisterInNewContentElementWizard`|register in new content element wizard |`bool $registerInNewContentElementWizard`|`true`|
80
+
|`setGroup`| Custom Group (used as optgroup for CType select, and as tab in New Content Element Wizard). If empty, "container" is used as tab and no optgroup in CType is used. |`string $group`|`'container'`|
81
81
|`setDefaultValues`| Default values for the newContentElement.wizardItems |`array $defaultValues`|`[]`|
82
82
83
83
__Notes:__
84
-
- If EXT:content_defender >= 3.1.0 is installed you can use `allowed`, `disallowed` and `maxitems` in the column configuration
84
+
- If EXT:content_defender >= 3.1.0 is installed, you can use `allowed`, `disallowed`, and `maxitems` in the column configuration
85
85
- The container registry does multiple things:
86
86
- Adds CType to TCA select items
87
87
- Registers your icon
88
88
- Adds PageTSconfig for `newContentElement.wizardItems`
89
89
- Sets ``showitem`` for this CType (`sys_language_uid,CType,tx_container_parent,colPos,hidden`)
90
90
- Saves the configuration in TCA in ``$GLOBALS['TCA']['tt_content']['containerConfiguration'][<CType>]`` for further usage
91
-
- We provide some default icons you can use, see `Resources/Public/Icons`
91
+
- We provide some default icons you can use; see `Resources/Public/Icons`
92
92
- container-1col
93
93
- container-2col
94
94
- container-2col-left
@@ -98,8 +98,8 @@ __Notes:__
98
98
99
99
### TypoScript
100
100
101
-
The TypoScript is necessary to define the rendering of the container in the frontend. Normally you will place it in your sitepackage or theme extension near the place where you define other stuff regarding your content elements.
102
-
`templateRootPaths` must be adapted to reflect the path of the html files in your sitepackage or theme extension.
101
+
The TypoScript is necessary to define the rendering of the container in the frontend. Normally, you will place it in your site package or theme extension near where you define other stuff regarding your content elements.
102
+
`templateRootPaths` must be adapted to reflect the path of the HTML files in your site package or theme extension.
103
103
104
104
// default/general configuration (will add 'children_<colPos>' variable to processedData for each colPos in container
@@ -145,7 +145,7 @@ The TypoScript is necessary to define the rendering of the container in the fron
145
145
146
146
### Template
147
147
148
-
The html template file goes in the folder that you have defined in your TypoScript above (see `templateRootPaths`). It's important to name it exacly as defined in `templateName` in TypoScript, in this case `2ColsWithHeader.html`. The file name is case-sensitive!
148
+
The HTML template file goes in the folder you defined in your TypoScript above (see `templateRootPaths`). It's important to name it exactly as defined in `templateName` in TypoScript, in this case,`2ColsWithHeader.html`. The file name is case-sensitive!
149
149
150
150
```html
151
151
<f:foreach="{children_200}"as="record">
@@ -169,27 +169,27 @@ With explicit colPos defined use `{children_200|201}` as set in the example abov
169
169
170
170
### BeforeContainerConfigurationIsAppliedEvent
171
171
172
-
* change container configuration for 3rdparty extensions container you have installed
173
-
* apply same configuration to all or a set of containers (e.g. ``gridTemplate``)
172
+
* change container configuration for 3rd-party extensions container you have installed
173
+
* apply the same configuration to all or a set of containers (e.g. ``gridTemplate``)
174
174
***Note** CType and Grid Structure cannot be changed (but Column Properties of the Grid)
175
175
176
176
### BeforeContainerPreviewIsRendered
177
177
178
-
change view object, e.g. add variables to view or change paths
178
+
Change view object, e.g., add variables to view or change paths
179
179
180
180
## Concepts
181
181
- Complete registration is done with one PHP call to TCA Registry
182
182
- A container in the TYPO3 backend Page module is rendered like a page itself (see View/ContainerLayoutView)
183
183
- For backend clipboard and drag & drop `<tx_container_parent>_<colPos>` used in the data-colpos attribute in the wrapping CE-div Element (instead of just the colPos as in the PageLayoutView)
184
184
- The `<tx_container_parent>_<colPos>` parameter is resolved to `tx_container_parent` and `colPos` value in DataHandler hooks
185
-
- When translating a container, all child elements get also translated (the child elements are not explicit listed during the translation dialog)
185
+
- When translating a container, all child elements also get translated (the child elements are not explicitly listed during the translation dialog)
186
186
- Copying or moving children of a container copies or moves translations as well
187
187
- Custom definitions make use of custom `colPos` values so site owners build their own elements, no fixed `colPos` given, so no interference with existing solutions
188
188
- Each container type is just a definition for its own `CType`
189
189
190
190
## CLI commands
191
191
192
-
There's several CLI commands to check/fix the integrity of the containers and their children.
192
+
There are several CLI commands to check/fix the integrity of the containers and their children.
193
193
194
194
```bash
195
195
# Check the sorting of container children
@@ -221,7 +221,7 @@ You can run our test suite for this extension yourself:
221
221
- run `Build/Scripts/runTests.sh -s functional`
222
222
- run `Build/Scripts/runTests.sh -s acceptance`
223
223
224
-
See Tests/README.md how to run the tests local (like github-actions runs the tests).
224
+
See Tests/README.md on how to run the tests locally (like how github-actions runs the tests).
225
225
226
226
To assure coding guidelines are fullfilled:
227
227
@@ -232,6 +232,6 @@ To assure coding guidelines are fullfilled:
232
232
233
233
This extension was created by Achim Fritz in 2020 for [b13 GmbH, Stuttgart](https://b13.com).
234
234
235
-
Find examples, use cases and best practices for this extension in our [container blog series on b13.com](https://b13.com/blog/flexible-containers-and-grids-for-typo3).
235
+
Find examples, use cases, and best practices for this extension in our [container blog series on b13.com](https://b13.com/blog/flexible-containers-and-grids-for-typo3).
236
236
237
-
[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.
237
+
[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of our work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.
0 commit comments