I simply want a menu item which scans the url, grabs the second argument, and plugs it into the second wildcard location of the new menu item it's creating.
So if the URL is: http://drupal.org/contenttype1/johndoe (johndoe = 2nd argument)
the menu item displayed will be: http://drupal.org/contenttype2/johndoe (johndoe = wildcard location)
So far, based upon a few forum, I've sketched out the following code, which is clearly incomplete, and it is doing nothing right now.
Basically, I just want this menu item to link to an existing page mysite.com/[coach name]/page. I'm using clean URLs by the way.
<?php
function coachmenu_menu() {
$items = array();
$items['%/page'] = array(
'title' => 'Coach Page',
'page callback' => 'coachpagelink',
'page arguments' => array('0'),
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
'menu_name'=>"menu-coach-menu",
);
return $items;
}
function coachpagelink($wildcard) {
return $wildcard;
}
Any ideas on what I can do?