Make CE copy action more flexible
Web -> Page -> Languages
When we have content Elements in the default language a Button called "Copy default content elements (#)" shows up.
This button copies all content elements in this column and sets their `l18n_parent` to the uid of the CE being copied from.
Pro's and Con's¶
- Easy to use
- keeps l18n_parent intact
- No way to copy from a different language
- keeps l18n_parent intact, thus no way to simply copy, not copy & reference
Keeping l18n_parent intact has some implications because the editor now works on references, rather on independent content.
In general the current way with referenced translations is fine.
But in order to translate independent content from a language, an editor needs to create all content elements again - resulting in a tedious task.
Proposed behavior¶The button "copy default content elements (#)" is being replaced with a split button.
The dropdown part of the button contains the following options:
- Translate from default language
- Copy from language `Language name` (per Language that has content elements on this page)
If the latter case of copying from a language the content elements are truly copied, so no reference to a parent language will be set.
This will speed up the process for an editor in case the editor needs independent, translated content.
[FEATURE] Allow copying from another language
This patch extends the "Copy from default elements" buttons by a dropdown
list of available languages. Clicking one of those languages creates
independent copies (not references!) of the selected language.
Reviewed-by: Mathias Schreiber <firstname.lastname@example.org>
Tested-by: Mathias Schreiber <email@example.com>
Reviewed-by: Stefan Neufeind <firstname.lastname@example.org>
Reviewed-by: Susanne Moog <email@example.com>
Tested-by: Susanne Moog <firstname.lastname@example.org>
[TASK] Reduce PageLayoutController and PageLayoutView dependencies
This is a follow-up to #68395 to reduce complexity and exposed
public API of that change.
Even if class components have the names "controller" and "view",
which implies an underlying MVC-stack, the PageLayout components
are far from using the pattern. That's why it's quite fine to put
processing logic to the place where it makes most sense and where
dependencies and cross-calls to other objects are kept low.
This change is only about refactoring and reducing the public API
in terms of information hiding and encapsulation. Besides that
the $languagesInColumnCache class variable was defined but never
use - which is changed now as well. Further flaws concerning
proper record selection are part of another change.
Reviewed-by: Anja Leichsenring <email@example.com>
Tested-by: Anja Leichsenring <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>
#14 Updated by Oliver Hader over 4 years ago
Using the new copy action means, that the regular overlay handling does not apply (default -> translation) in this case, right?
Thus, the new split button behavior can create translations that have a localization parent (fallback) and those that don't (copied) - these mix-cases leads to the button always being shown...
I'm not sure if I already correctly understood the scope and intention of this change...