We can add support for contextual menu for each individual paragraph that provided by https://www.drupal.org/project/paragraphs_edit
We just need to add
{{ title_suffix }}
in all paragraphs templates.
Let I do that patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | paragraphs_edit_module-2876623-6.patch | 5.17 KB | yaremchuk |
| #2 | paragraphs_edit_module-2876623-2.patch | 4.94 KB | yaremchuk |
Comments
Comment #2
yaremchuk commentedDone!
Don't forget to install https://www.drupal.org/project/paragraphs_edit
to see the contextual links for each paragraph!
Comment #3
thejimbirch commentedHi @Yaremchuk
Thanks for the patch. I am not familiar with that module. It seems it hasn't been worked on in a year. That has me a little nervous.
Also, the default template in the Paragraphs module does not have
{{ title_suffix }}. It seems odd to me since Paragraph bundles have no title.I'm not sure we should support this module. Any one else have an opinion?
Thanks,
Jim
Comment #4
yaremchuk commentedHi Jim,
let me explain.
in the native paragraph template from the module, there is
{{ content }}
variable where contextual menu is included.
As soon as you try to output {{ content.some_field }} instead, the full content variable you can loose contextual menu.
See https://drupal.stackexchange.com/questions/217608/adding-the-contextual-... for the reference.
The main goal of such challenge to simplify content manager work when we have a page with a large number of paragraphs.
For example,
It is difficult to edit all of this stuff on one page. I'm looked for the way to simplify that approach and I want to have one paragraph edit form for each paragraph when I worked on my Paragraphs LandingPage Framework.
I found a beautiful module Geysir, and I used it in my project.
But this approach has several week points.
Fortunately, I found the alternative Paragraphs Edit module, already mentioned.
I saw your beautiful presentation from Baltimore conference on YouTube and enjoy your module.
And I just want to help you to improve it.
By the way, I'm going to do a presentation about Paragraphs on our local Ukrainian Drupal event (http://camp17.drupal.ua/en/speakers/paragraphs-are-more-powerful-you-can) and I'll mention your module as the best set of paragraphs that site builders can use.
Thanks,
Vasily
Comment #5
thejimbirch commentedGreat post @Yaremchuk!
I understand now. If that is the case, shouldn't we include
{{ title_prefix }}also?In your patch, you added the
{{ title_suffix }}between the row and column div. I think it should go after the column div.Good luck with your presentation, looks great! If it recorded, please share afterwards!
Thanks,
Jim
Comment #6
yaremchuk commentedJim,
we need {{ title_suffix }} in template just to get contextual menu.
I think that we don't need to include {{ title_prefix }} because it's empty.
Yes, you can include {{ title_suffix }} in any relevant place.
A new patch attached.
Thanks,
Vasily
Comment #8
thejimbirch commentedComment #9
thejimbirch commentedClosed in 8.x-2.0-alpha4. Thanks Yaremchuk!
Comment #10
yaremchuk commentedHi Jim,
you asked it in the comment #5, let me share my presentation
https://www.youtube.com/watch?v=TBoEE3Bl1nI
Thanks,
Vasily
Comment #11
thejimbirch commentedGreat presentation!