Posted by laughnan on November 1, 2012 at 10:11pm
I have been working on getting a sample form set up, but it will not display in the URL, even when I use hook_menu(). Thoughts?
FILE: ocac_donation.module
function ocac_donation_menu() {
$items = array();
$items['donation/main'] = array(
'title' => 'Donate to Oregon College of Art & Craft',
'page callback' => 'ocac_donation_intro',
'access callback' => TRUE,
'expanded' => TRUE,
);
$items['donation/form'] = array(
'title' => 'Donate to OCAC',
'page callback' => 'drupal_get_form',
'page arguments' => array('ocac_donation_details'),
'access callback' => TRUE,
'description' => 'The donation form for the Oregon College of Art & Craft',
'file' => 'ocac_donation_details.inc',
'type' => MENU_NORMAL_ITEM,
);
}However, example.com/donation/main and example.com/donation/form both go to 404 Page Not Found.
Comments
Did you try clearing cache?
Did you try clearing cache?
I cleared the Drupal cache
I cleared the Drupal cache (it's run on a staging site that technically shouldn't be caching anything) and my browser cache as well..still no dice :/
Drupal always caches some
Drupal always caches some things - hook_menu() being one of them.
Anyways, you didn't return $items in your hook_menu(), so Drupal doesn't know about your paths. Return that, clear your cache, and you should be fine (the rest of your menu definition looks ok).
Jaypan We build websites
So obvious it makes me sick.
So obvious it makes me sick. Thank you!