Isn't possible to override theme as path is explicitly set for template

Created on 6 September 2024, 7 months ago

Problem/Motivation

Isn't possible to override theme as path is explicitly set for template

Steps to reproduce

Add a copy of the template `field--paragraphs-grid-formatter.html.twig` into your own theme template directory.

Proposed resolution

I understand the motivation for providing the hardcoded path (otherwise, the module can't easily supply a TWIG template within its own codebase).

Perhaps some conditional logic could be introduced to allow template overrides?

For now, I'm adding a patch to remove this.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom lukus

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @lukus
  • 🇬🇧United Kingdom lukus

    Seemed that the issue was `hook_suggestions_alter()` wasn't looking for the replacement template, that has been switched via `hook_theme_registry_alter()`.

    Patch attached.

  • Status changed to Needs review 7 months ago
  • 🇬🇧United Kingdom lukus
Production build 0.71.5 2024