1

I am new to panels and display suite both and trying to figure my way around those modules.

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.

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.

5
  • Just off the top of my head (and therefore a comment not an answer), you can create a custom page with a url like "path/%tax_term", and then bind "%tax_term" to a taxonomy term. You should be able to do the same operation for any entity. So I believe the answer is yes.
    – Letharion
    Commented Sep 27, 2014 at 20:48
  • So, does it mean that on this new path with panels you will not have any of original functionality regarding handling creation/edition of the entity, that was provided by original module (like custom validators)? You would get basic entity and its fields exposed and thats it? Commented Sep 28, 2014 at 1:22
  • If I understand what you are asking correctly, those are completely orthogonal. One can provide either a "View [entity]" context, or a "Edit [entity] context to a page, which will normally provide the view mode rendering, or the form for creating an entity. At a basic level, page manager doesn't care at all which entity you are providing.
    – Letharion
    Commented Sep 28, 2014 at 13:11
  • Actually, reading your title, I realize that I think you're heading down the wrong track. I generally avoid using Panels to break content down in that way. You probably want to use Display suite or just plain code to manage the layout of your content/forms. Then you want to use Panels to control WHERE those things are shown, but NOT HOW those things are rendered. Panels can do that, but I would advice you not to use it like that unless you know what you're doing.
    – Letharion
    Commented Sep 28, 2014 at 13:16
  • Edited question for clarity. So, you are saying I need to use both Display suite and Panels at the same time? Commented Sep 29, 2014 at 12:35

1 Answer 1

1

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.

  1. Implement a task handler. This is probably not trivial, but would allow full integration into Page manager. Could be contributed back to Ctools.
  2. 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.

2
  • Thank you for your extensive reply. So, I guess, I am out of luck with forms here - unless I want to code things in myself. Commented Sep 30, 2014 at 15:41
  • @AnthonyCerbic Not necessarily, as you can use PM existing pages. I actually added a note to the answer that PMEP might even be the preferred option for edit forms.
    – Letharion
    Commented Oct 1, 2014 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.