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.

Comments

Yaremchuk created an issue. See original summary.

yaremchuk’s picture

Status: Active » Needs review
StatusFileSize
new4.94 KB

Done!

Don't forget to install https://www.drupal.org/project/paragraphs_edit
to see the contextual links for each paragraph!

thejimbirch’s picture

Hi @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

yaremchuk’s picture

Hi 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,

many paragraphs

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

thejimbirch’s picture

Great 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

yaremchuk’s picture

StatusFileSize
new5.17 KB

Jim,
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

  • thejimbirch committed 9daafe0 on 8.x-2.x authored by Yaremchuk
    Issue #2876623 by Yaremchuk: Adds Paragraphs Edit Module support by...
thejimbirch’s picture

Status: Needs review » Fixed
thejimbirch’s picture

Status: Fixed » Closed (fixed)

Closed in 8.x-2.0-alpha4. Thanks Yaremchuk!

yaremchuk’s picture

Hi Jim,

you asked it in the comment #5, let me share my presentation
https://www.youtube.com/watch?v=TBoEE3Bl1nI

Thanks,
Vasily

thejimbirch’s picture

Great presentation!