0

I am including a template file from hook_theme.

function my_module_theme() {

  return array(
    'my_entity' => array(
      'variables' => array('title' => NULL, 'body' => NULL),
      'path' => drupal_get_path('module', 'my_module') . '/templates',
      'template' => 'my_entity'
    ),
  );
}

this is the code and i don't know why control is not going in template file. Note:- Cache flushed.

6
  • Template file name should be 'my-entity'. Sep 30, 2013 at 11:12
  • its that only.i have updated the question Sep 30, 2013 at 11:24
  • 1
    Are you using Drupal 6 or Drupal 7? Sep 30, 2013 at 11:27
  • For hook functions always clear the cache.
    – harshal
    Sep 30, 2013 at 11:30
  • @harshal cache cleared. drupal 7 Sep 30, 2013 at 11:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.