Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. $items['custom_report/glp_report'] = array(
  2. 'title' => 'GLP Report',
  3. 'description' => 'Report for Guided Learning Pathways.',
  4. 'page callback' => 'op_reports_page',
  5. 'access callback' => 'op_reports_permission',
  6. //'theme callback' => 'op_theme',
  7. 'type' => MENU_NORMAL_ITEM,
  8. );
  9.  
  10. $items['admin/custom_report/glp_report'] = array(
  11. 'title' => 'GLP Report',
  12. 'description' => 'Report for Guided Learning Pathways.',
  13. 'page callback' => 'op_reports_page',
  14. 'access callback' => 'op_reports_permission',
  15. //'theme callback' => 'op_theme',
  16. 'type' => MENU_NORMAL_ITEM,
  17. );
  18.  
  19. <!-- BEGIN OUTPUT from 'sites/all/themes/bootstrap/templates/block/block.tpl.php' -->
  20.  
  21. <!-- BEGIN OUTPUT from 'modules/block/block.tpl.php' -->
  22.  
  23. function op_reports_page() {
  24. $page = drupal_render(drupal_get_form('op_reports_form', 'glp'));
  25. $page .= op_reports_table('glp');
  26.  
  27. $page = array
  28. (
  29. 'op_reports_page' => array
  30. (
  31. // Note - we will register theme_my_page in the next step
  32. '#theme' => 'glp_reports',
  33. '#contents' => $page,
  34. ),
  35. );
  36.  
  37. return $page;
  38. }
  39.  
  40. function op_reports_theme()
  41. {
  42. return array
  43. (
  44. 'glp_reports' => array
  45. (
  46. 'variables' => array('contents' => array()),
  47. 'template' => 'op_theme', // don't add .tpl.php
  48. ),
  49. );
  50. }
  51.  
  52. <h2><?php print t('My Page'); ?></h2>
  53. <div id="my_page_wrapper">
  54. <?php print render($contents); ?>
  55. </div>
  56.  
  57. $items['admin/custom_report/glp_report'] = array(
  58. 'title' => 'GLP Report',
  59. 'description' => 'Report for Guided Learning Pathways.',
  60. 'page callback' => 'op_reports_page',
  61. 'access callback' => 'op_reports_permission',
  62. 'theme callback' => 'op_theme', //name of bootstrap extended theme
  63. 'type' => MENU_NORMAL_ITEM,
  64. );
  65.  
  66. function op_reports_custom_theme(){
  67. return 'op_theme';
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement