I have a page with layout plugin and all I can see is:

< class="ds-3col-stacked clearfix" > < class="group-header"> < class="group-left"> < class="group-middle"> < class="group-right"> < class="group-footer">

It looks like the wrapper elements are not set and the content is not shown.

Comments

dsnopek’s picture

Hi! Thanks for the bug report. :-)

Just to make sure I understand: you're using Page Manager to create a page using the "Block page (with Layout plugin integration)" variant from Layout Plugin, and you've chosen one of the Display Suite layouts?

If so, unfortunately, the Display Suite layouts aren't yet usable by Page Manager, because they expect the data to be setup differently. This is something I'm planning to work on in the near future. :-)

If you need a flexible set of layouts, I'd recommend using Radix Layouts instead:

https://www.drupal.org/project/radix_layouts

Unfortunately, the names aren't terribly useful and the UI doesn't yet show an image of the layout. But if you manually look at the icon images, you can get an idea of what each of the layouts is.

I hope that helps!

Anonymous’s picture

dsnopek: but radix looks outdated(it doesn't even have the src directory) and it doesn't implement the layout_plugin which as I understand it is the standard for layouts in D8.

Anyway thanks for the info.

dsnopek’s picture

but radix looks outdated(it doesn't even have the src directory) and it doesn't implement the layout_plugin which as I understand it is the standard for layouts in D8.

I think you might have downloaded the wrong thing, because radix_layouts 8.x-3.0-rc1 definitely works with layout_plugin - I ported it myself! :-) Here's a direct link to the release notes with download links:

https://www.drupal.org/node/2503233

There is no 'src' directory, because no source code is necessary to declare layouts: in the simplest case you can declare a layout with just a *.layouts.yml file and the Twig templates.

Try downloading and enabling the above module - you'll see ~30 new layouts appear. :-)

Anonymous’s picture

Title: Layout plugin has broke ntemplate » Layout plugin has broken template

I checked only the repo code. But I'll try, thanks :)

swentel’s picture

Title: Layout plugin has broken template » Switching layout should save the configuration form at least once (if applicable)
Project: Page Manager » Panels
Version: 8.x-1.x-dev » 8.x-3.x-dev
Component: Code » In-Place Editor (IPE)
Assigned: Unassigned » swentel

So this actually works now, however, we should move this to panels now, because switching from layout in the panels in place editor doesn't actually save the layout settings which leads to empty divs for instance when choosing a display suite layout :)

To reproduce: enable display suite which has additional layouts and configuration for the outer and inner wrappers (e.g. div ,article etc etc). When you switch, they will be empty. Only when going to admin/structure/pages and saving it there, the configuration will be available.

swentel’s picture

Also, I could be wrong, and maybe this belongs in layout plugin, not sure, @dsnopek what's your opinion ?

samuel.mortenson’s picture

We discussed in the IPE issue that the PanelsDisplayVariant has no setLayout function, which is why the IPE directly edits the "layout" key in the Display Variant configuration and doesn't actually do anything with the layout configuration. Either the IPE or the Display Variant should handle the changing-layout case.

swentel’s picture

Assigned: swentel » Unassigned

Oh, I missed those discussions, will read them to have a better idea on the subject.

dsnopek’s picture

Ah, yeah, I think this is a Panels/IPE issue.

@samuel.mortenson is right, that we need a setLayout() function (which is added by this other Panels issue: #2631854: Create PanelsDisplayManager and improve API for making working with PanelsDisplayVariants easier) and then the IPE should use it!

But we still have another problem in that the IPE doesn't show us the settings form to change any of the values away from the defaults.

samuel.mortenson’s picture

This is closely related to #2636990: Layouts should be grouped into categories in the IPE, in that what we'll likely end up with is identical UX between the Manage Content and Change Layout tabs (expand tab -> expand category -> open form -> submit/cancel form).

dsnopek’s picture

Status: Active » Closed (duplicate)