codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php /** * Implements hook_menu() */ function test_menu() { $items['testpage'] = array( 'title' => 'Test Path', 'page callback' => 'test_path_callback', 'type' => MENU_NORMAL_ITEM, 'access callback' => true, ); $items['testpage/changeme'] = array( 'title' => 'Test Path Original', 'page callback' => 'test_path_change_callback', 'type' => MENU_NORMAL_ITEM, 'access callback' => true, ); return $items; } /** * Implements hook_init() */ function test_init() { if(arg(0) == 'testpage') { $item = menu_get_item('testpage/changeme'); $item['title'] = 'Test Path Changed'; $item['path'] = 'testpage/changeme/1'; menu_set_item('testpage/changeme',$item); } } /** * Callback test * * @return string html * @author Samuel Leathers <sbl5007@psu.edu> **/ function test_path_callback() { return ''; } function test_path_change_callback() { return ''; } ?>
Private
[
?
]
Run code
Submit