Drupal 7 - How to load a template file from a module?

前端 未结 5 565
时光说笑
时光说笑 2021-02-08 04:06

I am trying to build my own module in Drupal 7.

So I have created a simple module called \'moon\'

function moon_menu() {
  $items = array();
      $items         


        
5条回答
  •  生来不讨喜
    2021-02-08 04:56

    For Drupal 7, it did not worked for me. I replaced line in hook_theme

    'file' => 'moon', by 'template' => 'moon' 
    

    and now it is working for me.

提交回复
热议问题