Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. <?php
  2.  
  3. // The hook_theme()
  4. function mymod_theme() {
  5.   return array(
  6.     'document' => array(
  7.      'variables' => array('document'),
  8.     ),
  9.   );  
  10. }
  11. // The hook_menu() entry
  12. $items['%taxonomy_term/%node'] = array(
  13.     'title' => 'node_page_title',
  14.     'title arguments' => array('%node'),
  15.     'file' => $inc_callback,
  16.     'page callback' => '_mymod_callback',
  17.     'page arguments' => array(0,1),
  18.     'access callback' => TRUE,
  19.     'type' => MENU_CALLBACK,
  20.  
  21. // The callback
  22. function _codoh_library_cat_cat_doc($term,$node) {
  23.  
  24.   $page = array('#tree' => True);
  25.   $page = node_view($node, 'full');
  26.   $page['#theme'] = 'document';
  27.  
  28.   return $page;
  29. }
  30.  
  31. function theme_document($variables) {
  32.   drupal_set_message('<pre>'.$variables.'</pre>');
  33.   return 'scheisse';
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement