So this has been driving me crazy for the past two days, hopefully someone can provide a solution, or at least step in teh right direction.

I'm working on a module, one of it's functions allows users to take a quiz, the results of which are passed in the url (for SEO reasons)

Example generated url: my-site/plan-trip/result/answer1/answer2/answer3/...

in my my_module_menu() function I have the item:

$items['my-site/plan-trip/result'] = array(
'page callback' => 'my_module_display_results',
'type' => MENU_CALLBACK,
title' => 'Quiz- results'
);

This is what is driving me crazy. If I go to 'my-site/plan-trip/result' (an actual page node I created) I see the correct navigation menu (primary links). But, when I access that page with answers in the url, I see no navigation menu.

Since the user does not have to answer all the questions, the generated url can have anywhere from 1-9 answers { 'my-site/plan-trip/result/answer1(/answer2(/answer3(...)))' }' So trying to use wildcards '%' in the $items have proven unsuccessful.

Is there simply a function I can call to set which menu menu to display?

Comments

t11o’s picture

Add another item

$items['my-site/plan-trip/result/%'] = array(
'page callback' => 'my_module_display_results',
'type' => MENU_CALLBACK,
title' => 'Quiz- results'
);
mdshields’s picture

is this documentation anywhere?