pdb icon indicating copy to clipboard operation
pdb copied to clipboard

Paragraphs module integration?

Open hawkeyetwolf opened this issue 8 years ago • 5 comments

In addition to blocks, how about attaching frameworks to Paragraphs? à la Entity Behaviors. I am all about the paragraphs, these days.

hawkeyetwolf avatar Jun 03 '16 16:06 hawkeyetwolf

@derekderaps as far as I can see, it should be integration with Drupal Field API and/or Field Types API instead of Paragraphs per se, since Paragraphs are field-able entities, it could be more suitable have integration with fields, don't you think so?

kenneth-bolivar-castro avatar Jun 10 '16 18:06 kenneth-bolivar-castro

Hmmm, that could be interesting. PDB works on components, repeatable chunks of "web" (CSS, JS, HTML). So if a given field represents a component, then yeah it makes sense. Paragraphs are set up perfect for this use case, but any entity reference could work well. And indeed any type of field could be made to represent a component. To me I think it makes most sense to focus on integrating with Entity API first, so PDB can actuate on any entity type.

hawkeyetwolf avatar Jun 10 '16 18:06 hawkeyetwolf

@mrjmd any feedback? I like this approach, we could start with a light integration, finding a way to create custom PDB fields or so, in order to have some early version of that, eventually after that we'd put all pieces together and see how it works.

kenneth-bolivar-castro avatar Jun 10 '16 18:06 kenneth-bolivar-castro

I am not super familiar with the paragraphs module (yet), but this sounds like an interesting idea. If someone wants to attempt a POC of integration I'd be happy to see it.

mrjmd avatar Jun 26 '16 22:06 mrjmd

@derekderaps and @mrjmd, I created a module project, right now it's a sandbox yet, but it works, https://www.drupal.org/sandbox/keboca/2755391

Angular 2 Entity provides a custom view mode to expose entities as Angular 2 components, see also a brief tutorial about exposing Articles by Drupal view as Angular 2 components, http://keboca.com/node/5

kenneth-bolivar-castro avatar Jun 26 '16 22:06 kenneth-bolivar-castro