Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. return theme('item_list', array('header' => $header,'items' => $rows));
  2.  
  3. /**
  4. * Implements hook_theme().
  5. */
  6. function MYMODULE_theme($existing, $type, $theme, $path) {
  7. $custom_theme = array();
  8. $custom_theme['my_new_theme'] = array(
  9. // example theme template register
  10. // for
  11. //sites/all/modules/mymodule/templates/my_new_theme.tpl.php
  12. 'template' => 'my-new-theme',//dash will convert to underscore in template name.
  13. 'path' => drupal_get_path('module', 'mymodule') . '/templates',
  14. 'variables' => array('header' => null,'rows'=>null),
  15. );
  16.  
  17. return $custom_theme;
  18. }
  19.  
  20. theme('my_new_theme', array('header' => $header, 'rows' => $rows));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement