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

  • Home
  • SEARCH
  • 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 6762465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:19:46+00:00 2026-05-26T14:19:46+00:00

You can’t use wildcards in menu paths? A quick summary of my problem (which

  • 0

You can’t use wildcards in menu paths? A quick summary of my problem (which I’ve made sure makes sense, so you’re not wasting your time): I have a menu which i’m showing on node pages of a certain content-type. My path to a node page would be like…

events/instal2010

…where instal2010 would be the name of an event (event is the content-type).

I’m using the Context and Menu Block modules to place a menu in the sidebar on that page…

  • Event (the default active item)
  • Programme
  • Visitor info
  • Book tickets

… where the path for Programme would be

events/instal2010/programme

So for this to work for many different events, those menu items need a wildcard in their path, e.g.

events/*/programme

Perhaps it’s time to ditch menus and just use a block with php to determine what page we’re on from the URL.

Any advice from experienced hands would be awsome, thanks.

  • 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-26T14:19:47+00:00Added an answer on May 26, 2026 at 2:19 pm

    You cannot create menu items with wildcards from the administrative interface of Drupal, but you can create menu items with wildcards in a module. I would recommend creating a custom module that uses hook_menu() to create the menu items. An example implementation would look something like:

    function YOURMODULE_menu() {
      $items = array();
    
      $items['events/%/programme'] = array(
        'title' => 'Programme',
        'description' => 'Loads a program page',
        'page callback' => 'YOUR CUSTOM FUNCTION NAME', // Custom function used to perform any actions, display the page, etc
        'page arguments' => array(1),  // Passes wildcard (%) to your page callback function
        'access callback' => TRUE, // Change if you want to control access
        'type' => MENU_NORMAL_ITEM, // Creates a link in the menu
        'menu_name' => 'primary-links' // Adds the link to your primary links menu, change if needed
      );
    
      return $items;
    }
    

    In $items['events/%/programme'] = array(, the % is the wildcard and it will be passed to your page callback function. It may be helpful to read more about hook_menu() and the Anatomy of hook_menu may also help as well.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can you guys help me understand a concept real quick, I'm having trouble understanding
Can we use the asterisk character * for a search action in SQL database?
can someone show me the regex for this preg_match. I want to make sure
Can I use the Kinect Windows Live Messenger on a PC? I heard rumor
can anyone help me in trying to check whether JavaScript is enabled in client
Can 2 or more equations defining a function in Haskell share the same where
can I make my own headers in HTTP request ? e.g. This is normal
Can this be done? It seems like this should be possible. In general, I

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.