I have a page that is definitely not a form but I need to use some callback functions to load data from an external source and display (e.g. a list of buildings on campus and their accessibility information).
What I have a need for is a landing listing page (lists all the buildings) and a 'view individual building' page. Also, I have a page where you punch in your student ID and view information on testing procedures. And finally I have a page that is basically a form (which I have done before successfully in the past).
Now, I HAD the building list working, however I made a small change and it stopped working!
Currently my hook_menu() function looks as below:
<?php
/**
* Implementation of hook_menu()
*/
function disability_menu()
{
$items = array();
// Ignore me, shell
$items['quickreg'] = array(
'title' => 'Quick Registration',
'description' => t(''),
'page callback' => 'drupal_get_form',
'page arguments' => array(),
'file' => 'disability.quickreg.view.inc',
'access arguments' => array('access quick registration system'),
'type' => MENU_SUGGESTED_ITEM,
);
$items['tests/status'] = array(
'title' => 'Test Status Results',
'description' => t('Check on the status of your tests'),
'page callback' => 'disability_view_testing_status',
'page arguments' => array(),
'file' => 'disability.tests.view.inc',
'access arguments' => array('access test check information'),
'type' => MENU_CALLBACK,
);
$items['tests'] = array(
'title' => 'Testing Services',
'description' => t('Check on the status of your tests'),
'page callback' => 'disability_view_testing',
'page arguments' => array(),
'file' => 'disability.tests.view.inc',
'access arguments' => array('access test check information'),
'type' => MENU_SUGGESTED_ITEM,
);
$items['access/%building'] = array(
'title' => 'Campus Accessibility Guide',
'description' => t('A summary list of detailed accessibliity information about each building on the A&M campus'),
'page callback' => 'disability_view_access',
'page arguments' => array(1),
'file' => 'disability.access.view.inc',
'access arguments' => array('access building access information'),
'type' => MENU_SUGGESTED_ITEM,
);
return $items;
}
Before some change I must have made the menu item for "Campus Accessibility Guide" would show up properly (after being enabled of course). The /access
url would work correctly displaying a list of all building and the /access/12345
would correctly display the single record of ID# 12345.
Now the access/%building
menu entry is not even showing up and even sending the url /access
into a redirect loop (making me think it's passing in something for the ID which sends it into the view specific function that redirects to /access
when the ID doesn't exist).
Can anyone tell me what I'm doing wrong or what I need to do to support 2 themed pages: a /access
and /access/%building
url pattern?