executing function with url..

mediashock - September 13, 2007 - 12:46

Anyone could tell me how i would execute a function i have called custom_front() ..
by going to example.com/custom_front/

and also where would i put the function ? into the template.php?

this would work in a module

bleak26 - September 13, 2007 - 13:23

This should work if placed in the same module as your custom function. I am still quite green and i have not tested it so u may need to make a change or two.

function yourmodulename_menu($may_cache) {
$items = array();
if ($may_cache) {

$items[] = array(
'path' => 'custom_front',
'title' => t('custom feed'),
'callback' => 'custom_front',
'access' => user_acess('access content'),
'type' => MENU_CALLBACK

);
}
return $items;
}

 
 

Drupal is a registered trademark of Dries Buytaert.