Problem/Motivation

If I create a copy of the file paragraph--ept-accordion-section--default.html.twig (for some customisations) and place it in my custom theme folder (in this case in /themes/custom/mytheme/src/ept-accordion/). After clearing the cache and reloading the page the module should use the changed file in the custom themes folder. Instead it still uses the file in the module folder from /modules/contrib/ept_accordion/

Steps to reproduce

Install module. Copy file paragraph--ept-accordion-section--default.html.twig from /modules/contrib/ept_accordion/ to your custom theme folder and make some modifications. Reloading the page with F5 (after clearing the drupal & browser cache) loads the yml from /modules/contrib/ept_accordion/.

CommentFileSizeAuthor
#9 b4e2340d6180456d987cd6cb191debfd.png38.78 KBlevmyshkin

Comments

saccard created an issue. See original summary.

levmyshkin’s picture

Hi saccard, here is explanation how to override EBT/EPT templates:
https://www.drupal.org/project/ept_slideshow/issues/3406887

levmyshkin’s picture

Status: Active » Needs review
levmyshkin’s picture

You also can use this module as custom and update main template. I will be glad to add your template as additional style for this EPT module.

levmyshkin’s picture

By the way, I will try to add override hook_theme_registry_alter() in EPT/EBT core modules to use theme templates as well.

levmyshkin’s picture

Status: Needs review » Active
levmyshkin’s picture

Status: Active » Needs work
saccard’s picture

Thank you levmyshkin for your quick reply. The customisations are not really an additional style. I would prefer when you change what you mentioned in #5. So everyone can override the module template with its own and put it in the custom theme folder.

levmyshkin’s picture

StatusFileSize
new38.78 KB

Hi saccard, I added new releases for EBT/EPT modules:
https://www.drupal.org/project/ept_core/releases/1.4.1
https://www.drupal.org/project/ebt_core/releases/1.4.16

I added a new theme suggestion with --custom suffix, so you can override template in your custom theme:

block--block-content--ebt-accordion--custom.html.twig
block--block-content--ebt-accordion.html.twig
paragraph--ept-accordion--default--custom.html.twig
paragraph--ept-accordion--custom.html.twig
paragraph--ept-accordion--default.html.twig

EBT/EPT templates

levmyshkin’s picture

Status: Needs work » Fixed
levmyshkin’s picture

Status: Fixed » Closed (fixed)