Guest User

Untitled

a guest
Feb 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <?php
  2. /*
  3. * Implementation of hook_menu()
  4. */
  5. function custom_example_menu(){
  6. $items['foo/bar'] = array(
  7. 'title' => 'Page Title',
  8. 'description' => 'Simple custom hook_menu() implementation.',
  9. 'page callback' => 'my_page_function',
  10. 'access arguments' => array('access content'),
  11. );
  12. return $items;
  13. }
  14.  
  15. /*
  16. * Returns custom content to Drupal
  17. */
  18. function my_page_function(){
  19. return theme('my_custom_template');
  20. }
  21.  
  22. /*
  23. * Implementation of hook_theme().
  24. */
  25. function custom_example_theme(){
  26. return array(
  27. 'my_custom_template' => array(
  28. 'template' => 'custom-page',
  29. ),
  30. );
  31. }
  32.  
  33. <html>
  34. <body>
  35. <p>hello</p>
  36. </body>
  37. </html>
Add Comment
Please, Sign In to add comment