Question:

How can I make this easier for me?

by  |  earlier

0 LIKES UnLike

I have a personal website, and have several pages! I also have a "navigation bar" where viewers can click on a set of main links (Home, About, Forum, Contact, etc) from any page. Whenever I add a new page, I don't want to have to go through my many pages and folders and add the link to the menu with html!

Is there anyway i can make one page to put the links on, and then import them onto the other pages?

 Tags:

   Report

3 ANSWERS


  1. Yes, try php and the require or include statements.  


  2. This is simple..

    If you change your pages to php (.php) then you can use text or php files to include in your "template".

    so if you have a set of links (your navigation) add them to a file called nav.php then insert <? include ("nav.php"); ?> on every page where you want the navigation. This allows you to update every single page's navigation with just the nav.php.

    You can do this with your content, adverts, banners or anything, for example: on your index page you can include a file called content.txt in the body (<? include ("content.txt"); ?>) then you can update just the text file when needed.

    The possibilities are endless

  3. The best way to do this would be take your navigation bar, and split it up, say your page is 800 pixels wide, and you have 4 pages, then you want each button to be 200 pixels long, but then, when you add a button, now you have five, so divide 800 by 5 and you get 160 pixels, and so on, or if you are going vertical, then just come up with a good length, usually 150 is good.

    Remember to keep you text in the center though! If you need more help, or want help on how to, email me.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.