logo

Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

Defining a template for a page created by the module

22/02/2025, by Anonymous (not verified)
Forums

Please suggest a solution for Drupal version 7

 

There is a module, and within the module, a page is defined as "module/page". For the callback function of the page, there are no issues defining a custom template through hook_theme; however, it works on the principle of a node template - displaying the content part of the page. How can I define a page-type template specifically for this page so that the template itself resides in the module folder rather than in the theme folder?

 

For Drupal 6, it seems that the following code works:


 
function mymodule_theme_registry_alter(&$theme_registry) {
  array_unshift($theme_registry['page']['theme paths'], drupal_get_path('module', 'mymodule'))

} 

 

Please suggest a solution for version 7