2
Quote:
densma wrote:
how can i add external link on main menu navigation?
AFAIK, you can write a very simple module to do this, but it's kind of (read as "very much") a hack. Here's an example which creates a like to
The EFF (where you should immediately go and donate if you haven't done so recently).
This example also creates a sub menu with a "donate" link (however, you should be careful with sub menus, because some themes won't display them unless you're actually in that module, which will never happen here). Create the following files:
// === html/modules/my_main_menu_hack/index.php ===
include 'mainfile.php';
// This is just to get past the automatic URL recognition
// when I posted it to this forum
$url = 'http' . '://' . 'eff.org/';
// Redirect the browser to the desired location
header('Location: ' . $url);
?>
// === html/modules/my_main_menu_hack/xoops_version.php ===
// This will be the name of the link
$modversion['name'] = 'Visit The EFF';
// This must be the same as the directory name in which this
// module resides
$modversion['dirname'] = 'my_main_menu_hack';
// No admin menu
$modversion['hasAdmin'] = 0;
// We do have a main menu
$modversion['hasMain'] = 1;
// The following three lines make up the sub menu, so you
// may want to omit them
$modversion['sub'][1]['name'] = 'Donate';
$url = 'http' . '://' . 'eff.org/donate/';
$modversion['sub'][1]['url'] = $url;
?>
I
think that should work. It's a
total hack though. Are there any other
easier ways that anyone else out there knows of?