Created
July 5, 2017 18:28
-
-
Save danielmme/feb1b65290f2599eaf32311495a1e28d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hook_menu(){ | |
$items = array(); | |
$items['mycustompage/%'] = array( | |
'page arguments' => array(1), | |
'page callback' => 'page_example', | |
'access_callback' => TRUE, | |
'access arguments' => array('access content'), | |
'type' => MENU_CALLBACK, | |
); | |
$items['mycustompage2'] = array( | |
'page callback' => 'page_example2', | |
'access_callback' => TRUE, | |
'access arguments' => array('access content'), | |
'type' => MENU_CALLBACK, | |
'delivery callback' => 'example_ajax', | |
); | |
return $items; | |
} | |
function page_example($arg) { | |
return theme('template_example_page', array('arg' => $arg)); | |
} | |
function hook_theme() { | |
return array( | |
'template_example_page' => array( | |
'template' => 'page-agenda', | |
'variables' => array('arg' => NULL), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implements hook_menu