Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 336461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:14:40+00:00 2026-05-12T10:14:40+00:00

I have a page that is definitely not a form but I need to

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:14:41+00:00Added an answer on May 12, 2026 at 10:14 am

    You should only use %name instead of % in urls when you have a function that you want to act on the url. Drupal does this all over the place with user and node, and this is very smart, as you only one place need to have the code to load an user or a node, but it get used in a lot of places. In this case I bet it’s a bit overkill to make a function to load the building. On the other hand the advantage is that doing it that way, you get the 404 handling, if no object can be found. The best solution really comes down to how you want to handle buildings that does not exist. You could even make your ‘Campus Accessibility Guide’ function handle the 404 which would make the two options more or less equal. I would go for whatever is easiest for you to make.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that looks like this: Head and body tags... <form runat=server>
I'm not a PHP developer here. I have a page that is unable to
I have a page that builds out a table. Nothing else on that page
I have a page that lets the user edit the content of the page
I have a page that uses the Telerik RadListView control and a Telerik RadDataPager
I have a page that I want to update non stop, every few seconds.
I have a page that consists of a header div for navigation, a content
I have a page that I am using an Ajax Accordion and when I
I have a page that has no vertical scroll, rather, everything is displayed horizontally.
I have a page that uses another page via the include() function. The page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.