OZONE Asylum
Forums
Stupid Basic HTML
menu
This page's ID:
9610
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
If you have access to PHP, you'll have an easy time. Just put your menu in a different page ("menu.php," for instance) and then refer to it on every other page with [b]include("menu.php");[/b]. Your "menu.php" will be included on every page, and if you make a change to it, the change will be reflected everywhere. If you don't have PHP, you might at least have server-side includes -- in that case, you'd have to name your page with the .shtml extension, and put <!-- #include virtual="menu.html" --> where you want the menu to appear. The link thing you're talking about would be easy with PHP, impossible with just server-side includes. The easiest way to do it in PHP would be to create an associative array where each key is the link text and each value is the href. (That is, $menu_array = array("Home" => "/index.php", "Whupass" => "whupass.php", etc).) Then run through your menu with [code] while (list($key, $value) = each($menu_array)) { if ($value == $PHP_SELF) { echo "<p><span class=\"current\">$key</span>\n\n"; } else { echo "<p><a href=\"$value\" title=\"$key\">$key</a></p>\n\n"; } } [/code] span.current is a CSS class which contains the formatting for the current page. Say you want the menu to have all the active links in small blue text, but the page you're on shows up with a yellow background and black text, just "span.current { background: yellow; color: black; }" and there you go.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »