You are here: Re: newbie navbar question « HTML « IT news, forums, messages
Re: newbie navbar question

Posted by Nico Schuyt on 11/12/06 05:02

Terry Liittschwager wrote:
> Anyway, my current very basic question concerns the navigation bar on
> the upper left of each page. It's the same for each page, works
> fine, and is currently implemented with the following lines in each
> page:
> <div class="navbar">
> <p><a href="index.html">Home</a></p>
> <p><a href="policies.html">Policies</a></p>
> <p><a href="agencies.html">Agencies<br />Served</a></p>
> <p><a href="statistics.html">Statistics</a></p>
> <p><a href="construct.html">Quilt<br>Construction</a></p>
> <p><a href="testimonials.html">Testimonials</a></p>
> <p><a href="history.html">History</a></p>
> </div>
> The problem is that whenever I want to add another line, I have to
> edit every page. I'm sure there must be some way to have those lines
> in a separate file, referenced by one line unchanging line in each
> page, so that when I change the navbar, I only have to do it in the
> one place.

If your server supports PHP (ask your host):
- Place the menu code in a separate file: navbar.html
- Make a new file test.php with content: <?php include "navbar.html"; ?>
- Upload test.php to te server and open it
- If the menu is shown: rename your pages to *.php and replace the menu code
with the include string

Alternatives: http://allmyfaqs.net/faq.pl?Include_one_file_in_another

--
Nico Schuyt
http://www.nicoschuyt.nl/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация