How could you create a website lije this?

Anna

I am just me
Staff member
Messages
11,752
Reaction score
581
Points
113
the simplest solution is probably to add the navigation to all pages (using include so you don't get so many places to make sure nav is up to date if you need to add something to the menu would be easiest)
 

vol7ron

New Member
Messages
434
Reaction score
0
Points
0
randommaker.... hahaha... I'm so unsure of what you're asking.

The navbar is just HTML/possibly server-side scripted. And the site is nothing special. It's on each of the pages.

I'm responding to this post because I think what you're really asking about is the navbar image (button highlight) for what page is being viewed. For instance, on the home page the "Home" has the white background image, and if you click on the "Freebies" or "Forums" link, when you go to their page, they will have the white background in the navbar.

Is that what you're asking?

If so, you can do this with parameter control, if your navbar is scripted, or you can do this with regular Javascript, if you just parse the URL. For instance, you can use Javascript to get the address bar's URL, parse it for the word "forum" if it exists, change that button's css class to "on"

Is that what you're asking?
 

datumon

New Member
Messages
17
Reaction score
0
Points
0
I'm getting the same idea across as vol7ron, to make the different page names select then you could use a class, explained simply: the page you're on could be given the class current.page, and the other links give other.page. You'd then create a CSS or similar document and set how you'd like each class to display. This would give all of your links a uniform look and feel, and save a lot of clicking, setting font sizes and alignment etc. for every single link.
What Web Design software are you using?

Datumon.
 

pythondev

New Member
Messages
59
Reaction score
0
Points
0
*Edit*

I understand what he means now....
Is just a custom forum template, done it before, is not difficult, just edit the layout file for the phpbb
 
Last edited:

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
also you can use PHP if you would rather not use Javascript
hint: use an array and make your key the title of the link, and the value the path to get to that page, and just run it through a loop with an if statement
 

frankfriend

Member
Messages
410
Reaction score
2
Points
18
I think you should look at Lay Anna's suggestions again.

The navigation is done within a repeated chunk of code, which could be html code.

The obvious way is to use Include files, so you put all the navigation in one file, and you can therefore maintain it on hundreds of pages, but only maintain it in one place.
 

mattura

Member
Messages
570
Reaction score
2
Points
18
As frankfriend noted, "include" is your friend....

have a page "header.php" with your menu navigation in, and include it on every page at the top.
eg index.php:
PHP:
<?php
include "header.php"
page content
...
?>
 
Top