I am new to panels and display suite both and trying to figure my way around those modules.
My preference is to use to Panels (or technically, Page manager) to control Context, that is, What to display Where.
Separately from that, you can use Display suite, or a recent favorite, Slate, for controlling rendering, or How things are displayed.
Allowing Page manager to render complete view modes instead of individual fields allows for much smarter caching most of the time, which can be a big performance gain.
If you're comfortable with code, Slate is significantly faster than Display Suite, for another large performance gain.
In "Display Suite" with "Display Suite Forms" you get an extensive list of all entities and bundles and can override any of the create/edit form layout.
In "Page Manager" I see only 'node add form', 'node edit form' and 'user edit form' context out of the box. Is there a way to generalize it and use "Panels" functionality with other entities on the site like Display Suite does it? I mean, without writing code.
'node add form', 'node edit form' and 'user edit form' are displayed as they are because the UI originates from D6, when there were no entities. The entire UI really needs a rewrite to be entity generic, but I don't know about anyone working on that.
What I want is to take existing entity, say 'commerce_customer_profile' and automatically have its 'X edit form' and 'X add form' contexts available in Panels. Or something equivalent.
Panels/Page manager has an entity generic
context, but I think Display suite has deeper integration with entities.
You can bind any entity to a page as a context by creating a new
Page, giving it a argument, for example
%commerce_customer_profile and map it to the relevant underlying entity type.
To be fair though, I'm not sure this works for edit forms, I haven't had a reason to try that I can think off. If it doesn't, I can think of two things to do.
- Implement a task handler. This is probably not trivial, but would allow full integration into Page manager. Could be contributed back to Ctools.
- Use Page manager existing pages to take over the rendering of the existing edit forms. Using this module is likely a good option specifically for edit pages, as you should rarely be using Panels directly to tear up a form anyway; that can cause unintended data loss.
Because Display suite and Panels are often seen as some form of competitors (which I think is wrong), it's worth noticing that the author of PM Existing pages is also the author of Display suite.