Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Occasionally, you need to add a menuitem or several to the site header navbar. Without modifying code, you can use this technique to add a menuitem.

The menuitems are controlled by a core Geeklog function called COM_siteHeader and it sets template variables in yorur theme header.thtml file. These template variables are
Text Formatted Code
{menu_elements}{plg_menu_elements}
 
and they are replaced at run time with the core menuitems and all links for the installed plugins.

The staticpages plugin is one such plugin that can create links for your staticpages - it's an option "Add to Menu" when creating a staticpage.

You can use a staticpage then to add a menuitem. Let's say you want to add a link to your photo gallery. Create a staticpage with this content.
Text Formatted Code

echo '<script language="Javascript">';
echo 'document.location="/gallery/index.php";';
echo '</script>';

 


This will use a Javascript to force a redirect to the new URL for your gallery main script.

Geeklog components by PortalParts -- www.portalparts.com

Status: offline

cboyer

Forum User
Newbie
Registered: 06/17/04
Posts: 7
Blaine,

Stupid oversight on my part, but when I add the code (and Gallery is indeed where the scriupt indicates) my output is:

gallery
echo '';

And that's it. Am I just braindead?