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

CommentFileSizeAuthor
#6 2857972-6.patch803 bytesswentel
#5 2857972-5.patch765 bytesswentel

Comments

rodrigoaguilera created an issue. See original summary.

rodrigoaguilera’s picture

Issue summary: View changes

Add a proposed resolution.

swentel’s picture

Priority: Normal » Major

Raising to major

swentel’s picture

Status: Active » Needs review
StatusFileSize
new765 bytes

This is a test that proves there's no problem at least with the base templates

swentel’s picture

StatusFileSize
new803 bytes

even better patch with explicit assert on ds-1col class

  • swentel committed 82e7e77 on 8.x-3.x
    Issue #2857972 by swentel: Some content wrappers are not passed to...
swentel’s picture

Status: Needs review » Fixed

Committed, going over to #2802429: Display layout twig not overridable. - we're close! :)

rodrigoaguilera’s picture

Title: Some content wrappers are not passed to display suite layouts twig templates » Some content wrappers are not passed to display suite layouts overridden twig templates
Related issues: +#2802429: Display layout twig not overridable.

I 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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.