Welcome to WebmasterWorld Guest from 54.166.87.123

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Navigation Question

   
3:27 pm on May 10, 2004 (gmt 0)

10+ Year Member



Hello All,

I've got a question for ya...I have a website that has different bands on it and i am constantly adding new artists to the navigation which is on each page. What i would like to do is have one page that has the navigation on it that updates all the other pages when its changed (other artists are added). Is this possible? Here's a sample of my html for my navigation (drop-down box):

<SELECT name="guidelinks" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<OPTION SELECTED value="javascript:void(0)">--Select An Artist--

<OPTION value="http://mywebsite/Aaron_Watson.htm">Aaron Watson
<OPTION value="http://mywebsite/Bleu_Edmondson.htm">Bleu Edmondson

I am new to this so i may not be up to something really advanced but i'm open to any suggestions yall might have.

Thanks!

3:33 pm on May 10, 2004 (gmt 0)

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If your server runs php, should be pretty easy: First check if you got php, make a file called php.php and put these lines in it:

<?
phpinfo();
?>

Navigate to yousite.com/php.php and if you get nice pretty stuff then all is well, if not, wait for someone to suggest another way ;)

all you need do is this:

make a file called menu.inc and put your html for the menu in it. put it somewhere for 'includes' like /php/includes/

then, on each page, instead of your menu, put these lines:


<?
include('/php/includes/menu.inc');
?>

SHould do the trick, and if you like that idea, check out a real templating engine: [smarty.php.net...]

Nick