Welcome to Geeklog, Anonymous Monday, November 28 2022 @ 07:18 pm EST

Geeklog Forums

Tip: How to add header menu items

Status: offline


Forum User
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
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


Forum User
Registered: 06/17/04
Posts: 7

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

echo '';

And that's it. Am I just braindead?

All times are EST. The time is now 07:18 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content