How about we add couple of twig blocks into the paragraph.html.twig. Other modules/theme will then have less work when they want to add specific paragraph template implementation - because they can just use {% extends "@paragraphs/paragraph.html.twig" %} and overwrite only parts.

And as i understand introducing this blocks should not break existing template overrides, correct?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pivica created an issue. See original summary.

pivica’s picture

Here is a patch, also fixed some indent errors.

pivica’s picture

Status: Active » Needs review
pivica’s picture

Change my mind a little bit about position of first outer block, no sense that it wrap classes var, who ever wants to change that it is easier then to define the whole template override from a start and not to use extend.

zerolab’s picture

Status: Needs review » Reviewed & tested by the community

Straightforward change and outright improvement.
LGTM!

Leaving this blog post as a reference on extending twig templates.

Cheers,
Dan

miro_dietiker’s picture

Status: Reviewed & tested by the community » Fixed

Too much back-and-forth... Accidentally committed this with f866bdf in #2849503: Use subform state for the BehaviorForm() functions

Setting to fixed, reopen if further changes are needed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.