Allow module to overwrite multiple templates from module I have a couple paragraphs set up in my content type.  I would like to overwrite the templates from my module (long story - we want to reuse this same set up across multiple sites if I get this to work).

I used the following hook in my module:

/**
 * Implements hook_theme_registry_alter().
 */
function my_module_theme_registry_alter(&amp;$theme_registry) {
  $theme_registry['paragraph']['path'] = drupal_get_path('module', 'my_module') . '/templates/paragraph';
  $theme_registry['paragraph']['template'] = 'paragraph';
}


In my module's templates/paragraph folder I have the following files:

paragraph.html.twig
paragraph--accordion.html.twig
paragraph--carousel.html.twig


Here is theme debug:

&lt;!-- THEME HOOK: 'paragraph' --&gt;
&lt;!-- FILE NAME SUGGESTIONS:
   * paragraph--accordion--default.html.twig
   * paragraph--accordion.html.twig
   x paragraph--default.html.twig
   * paragraph.html.twig
--&gt;
&lt;!-- BEGIN OUTPUT from 'modules/contrib/bootstrap_paragraphs/templates/paragraph/paragraph.html.twig' --&gt;


It seems to work but the problem is that paragraph--accordion and paragraph--carousel always use paragraph.html.twig.  How can I have paragraph--accordion and paragraph--carousel use the templates that are in my module. If I place them in my theme's template folder they do render.
I was able to figure it out. I only used hook_theme_registry_alter().  You have the copy $theme_registry['paragraphs'] to all items you want to use paragraphs.

/**
 * Implements hook_theme_registry_alter().
 */
function my_module_theme_registry_alter(&amp;$theme_registry) {
  $module_path = drupal_get_path('module', 'my_module');

  // Use the templates in my module's template folder.
  $theme_registry['paragraph__accordion'] = $theme_registry['paragraph'];
  $theme_registry['paragraph__accordion']['path'] = $module_path . '/templates/paragraph';
  $theme_registry['paragraph__accordion']['template'] = 'paragraph--accordion';
  $theme_registry['paragraph__carousel'] = $theme_registry['paragraph__accordion'];
  $theme_registry['paragraph__carousel']['template'] = 'paragraph--carousel';
}