Is it possible with one of the template suggestion hooks to also specify a new template location? In a custom module I'm adding a custom page template suggestion per multi-site like following which would then search for page--MYSITE.html.twig in the current theme's /templates folder.

/**
 * Implements hook_theme_suggestions_HOOK_alter().
 */
function MYMODULE_theme_suggestions_page_alter(array &amp;$suggestions, array $variables) {

  $site_path = \Drupal::service('site.path');
  $site_path = explode('/', $site_path);
  $site_name = $site_path[1];

  $suggestions[] = 'page__' . $site_name;
}


Question: Is it possible to also specify a new location for this template. Like let's say inside my custom module's /templates folder?

Why: It would let me use a core theme but with my custom template (without the need to add something custom to core or to create a new sub-theme, lazy as I am).

There are 3 suggestion hooks that come into my mind but with none if them it seems possible to also specify a custom location. Is this right? Or is there a way? Is it bad practice to do so?


hook_theme_suggestions_alter
hook_theme_suggestions_HOOK_alter
hook_theme_suggestions_HOOK
Is it possible with one of the template suggestion hooks to also specify a new template location?


You can specify a new template location in hook_theme():


  path: Override the path of the file to be used. Ordinarily the module or theme path will be used, but if the file will not be in the
  default path, include it here. This path should be relative to the
  Drupal root directory.





  Like let's say inside my custom module's /templates folder?


This means when using hook_theme() instead of hook__theme_suggestions_* the module's template folder is already default and you don't need to specify path.

So you can use this answer  hook_theme_suggestions_page() provide default template file inside module folder.