I got tired of constantly changing the navigation bar on our numerous
top-level pages, so I finally used an include of an html-only file. Here's
a snippet:
<div class="navleft" >
<a href="home.php" >Home</a>
<div class="navspace r"></div>
<a href="newitems. php"><b>New Items!</b></a>
<div class="navspace r"></div>
<a href="items1.ph p">items 1</a>
<a href="items2.ph p">items 2</a>
<a href="items3.ph p">items 3</a>
<div class="navspace r"></div>
<a href="blah blah">blah blah</a>
<a href="contact.p hp"><b>Contac t Us!</b></a>
</div>
Now I want to modify the nav bar so that the active page is not a clickable
link and appears differently. E.g., when the items 1 page is active, the
nav bar should have
<div id="activeselec tion">items 1</div>
instead of the href line.
I can turn the include file into php code and have a whole mess of
if-then-else combos for each nav bar entry, but that's pretty messy. So php
gurus, how can I best code a single include file?
Thanks.
jay dub
top-level pages, so I finally used an include of an html-only file. Here's
a snippet:
<div class="navleft" >
<a href="home.php" >Home</a>
<div class="navspace r"></div>
<a href="newitems. php"><b>New Items!</b></a>
<div class="navspace r"></div>
<a href="items1.ph p">items 1</a>
<a href="items2.ph p">items 2</a>
<a href="items3.ph p">items 3</a>
<div class="navspace r"></div>
<a href="blah blah">blah blah</a>
<a href="contact.p hp"><b>Contac t Us!</b></a>
</div>
Now I want to modify the nav bar so that the active page is not a clickable
link and appears differently. E.g., when the items 1 page is active, the
nav bar should have
<div id="activeselec tion">items 1</div>
instead of the href line.
I can turn the include file into php code and have a whole mess of
if-then-else combos for each nav bar entry, but that's pretty messy. So php
gurus, how can I best code a single include file?
Thanks.
jay dub
Comment