Skip to main content
improved formatting
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I finally fixed the problem. As Berdir said, to recognize a template you need to explicitly specify a suggestion in your hook_theme() in yourthe hook_theme() implementation of the module. My hook_theme()hook_theme() looks like this:

function equipment_theme(array $variables)
  {
  $theme = array();

  # Suggestion for the template
  $theme['node__equipment'] = array(
      'render element' => 'content',
      'base hook' => 'node',
      # template file
      'template' => 'node--equipment',
      # location of the template file
     'path' => drupal_get_path('module', 'equipment') . '/templates',
  );

  return $theme;
}

I finally fixed the problem. As Berdir said to recognize a template you need to explicitly specify a suggestion in your hook_theme() in your module. My hook_theme() looks like this:

function equipment_theme(array $variables)
 {
  $theme = array();

  # Suggestion for the template
  $theme['node__equipment'] = array(
      'render element' => 'content',
      'base hook' => 'node',
      # template file
      'template' => 'node--equipment',
      # location of the template file
     'path' => drupal_get_path('module', 'equipment') . '/templates',
  );

  return $theme;
}

I finally fixed the problem. As Berdir said, to recognize a template you need to explicitly specify a suggestion in the hook_theme() implementation of the module. My hook_theme() looks like this:

function equipment_theme(array $variables) {
  $theme = array();

  # Suggestion for the template
  $theme['node__equipment'] = array(
      'render element' => 'content',
      'base hook' => 'node',
      # template file
      'template' => 'node--equipment',
      # location of the template file
     'path' => drupal_get_path('module', 'equipment') . '/templates',
  );

  return $theme;
}
Source Link
Adrian
  • 193
  • 1
  • 10

I finally fixed the problem. As Berdir said to recognize a template you need to explicitly specify a suggestion in your hook_theme() in your module. My hook_theme() looks like this:

function equipment_theme(array $variables)
{
  $theme = array();

  # Suggestion for the template
  $theme['node__equipment'] = array(
      'render element' => 'content',
      'base hook' => 'node',
      # template file
      'template' => 'node--equipment',
      # location of the template file
     'path' => drupal_get_path('module', 'equipment') . '/templates',
  );

  return $theme;
}