Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to override the print templates from my custom module, but I can't achieve.
I wrote my mymodule_theme function in mymodule.module. I can do it for node templates override, but I don't know which are the values for print module . Sorry but I do not know in depth the theme system.
function mymodule_theme($existing, $type, $theme, $path) {
return array(
'print__html__node__node_type' => array(
'render element' => 'content',
'base hook' => 'print',
'template' => 'print--html--node--node_type',
'path' => drupal_get_path('module', 'mymodule') . '/templates',
),
'node__node_type' => array(
'render element' => 'content',
'base hook' => 'node',
'template' => 'node--node_type',
'path' => drupal_get_path('module', 'mymodule') . '/templates',
),
);
What is the correct form ?
Comments