Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danielmme/feb1b65290f2599eaf32311495a1e28d to your computer and use it in GitHub Desktop.
Save danielmme/feb1b65290f2599eaf32311495a1e28d to your computer and use it in GitHub Desktop.
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),
),
);
}
@danielmme
Copy link
Author

Implements hook_menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment