Skip to content

[TASK] Mention constraints of content structure in README #482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,35 @@ With explicit colPos defined use `{children_200|201}` as set in the example abov
- 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
- Each container type is just a definition for its own `CType`

## Migration to EXT:container

In case you want to migrate your existing hierarchical contents (e.g. EXT:gridelements) to EXT:container it's best to know a bit about the internal structure.

* a CEs `pid` should always match its container CEs `pid`
* a CEs `tx_container_parent` points its container CEs `uid`
* a CEs `sorting` is pid-wide (and thus logically consistent for all CEs within the same `colPos`)
* a translated CEs `l18n_parent` points obviously to its translation origin (if it has one)
* a translated CEs `tx_container_parent` doesn't point to the translated parent (as you would assume) but to the translation origin
* a translated container CE should have the same CType as its translation origin _if they're "connected"_
* a container doesn't store the number of its children (there no pendant to the field `tx_gridelements_children`)

Here's a typical use case of a translated container and its child CEs.

```
+--------+-----+------------------+-------------+-----------+--------+---------------------+---------+
| uid | pid | sys_language_uid | l18n_parent | CType | colPos | tx_container_parent | sorting |
+--------+-----+------------------+-------------+--------------+-----+---------------------+---------+
| 123 | 15 | 0 | 0 | 2_columns | 0 | 0 | 256 |
| 321 | 15 | 0 | 0 | text | 100 | 123 | 512 |
| 322 | 15 | 0 | 0 | text | 100 | 123 | 768 |
| 330 | 15 | 0 | 0 | text | 101 | 123 | 1024 |
| 1123 | 15 | 1 | 123 | 2_columns | 0 | 0 | 1280 |
| 1321 | 15 | 1 | 321 | text | 100 | 123 | 640 |
| 1322 | 15 | 1 | 322 | text | 100 | 123 | 896 |
| 1330 | 15 | 1 | 330 | text | 101 | 123 | 1152 |
+--------+-----+------------------+-------------+-----------+--------+---------------------+---------+
```

## CLI commands

There's several CLI commands to check/fix the integrity of the containers and their children.
Expand Down