Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dsnopekHi! 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!
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commenteddsnopek: 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.
Comment #3
dsnopekI 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. :-)
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI checked only the repo code. But I'll try, thanks :)
Comment #5
swentel CreditAttribution: swentel commentedSo 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.
Comment #6
swentel CreditAttribution: swentel commentedAlso, I could be wrong, and maybe this belongs in layout plugin, not sure, @dsnopek what's your opinion ?
Comment #7
samuel.mortensonWe 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.
Comment #8
swentel CreditAttribution: swentel commentedOh, I missed those discussions, will read them to have a better idea on the subject.
Comment #9
dsnopekAh, 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.
Comment #10
samuel.mortensonThis 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).
Comment #11
dsnopekThis was fixed by #2636990: Layouts should be grouped into categories in the IPE which was committed!