Problem/Motivation
I'm trying to update a existing site to drupal 8.3-rc1 and I have some overriden ds templates in my theme.
The content wrappers for the two column layout are missing so the markup displayed is "<>".
The 1 column layout is fine if not overriden. when you add a ds-1col.html.twig
that template won't have the ds_content_wrapper variable and just show the attributes as markup.
Proposed resolution
Change twig templates to get the variables in their new locations like ds-1col
BEFORE:
<{{ ds_content_wrapper }}{{ attributes.addClass('ds-1col', 'clearfix') }}>
{{ title_suffix.contextual_links }}
{{ ds_content }}
</{{ ds_content_wrapper }}>
AFTER:
<{{ settings.wrappers.ds_content }}{{ attributes.addClass('ds-1col', 'clearfix') }}>
{{ title_suffix.contextual_links }}
{{ content.ds_content }}
</{{ settings.wrappers.ds_content }}>
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
rodrigoaguileraAdd a proposed resolution.
Comment #3
swentel commentedRaising to major
Comment #4
swentel commentedThis seems to be related with either #2802429: Display layout twig not overridable. or #2860490: Invalid argument supplied for foreach() in ds_preprocess_ds_layout() line 366 of ds.module
Comment #5
swentel commentedThis is a test that proves there's no problem at least with the base templates
Comment #6
swentel commentedeven better patch with explicit assert on ds-1col class
Comment #8
swentel commentedCommitted, going over to #2802429: Display layout twig not overridable. - we're close! :)
Comment #9
rodrigoaguileraI feel this one should be solved first
#2802429: Display layout twig not overridable.
And then we can see how to deal with the variables on overridden templates.
There is no problem with the twigs in the module, updating the title accordingly