Current link Dynamically disabled????

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mhulse
Forum Commoner
Posts: 41
Joined: Fri Jun 11, 2004 12:50 am

Current link Dynamically disabled????

Post by mhulse »

Title: Current link Dynamically disabled????

Hello,

What is the best way to dynamically disable the "current page" link in a CSS based nav?

I would prefer PHP... no JS...

Because I am using templates, I do not want to hand style the menu on each page like so:

Code: Select all

/*css*/
	a:active, a.current {
	color: #666666;
}

Code: Select all

<!-- HTML -->

<div id="nav_banner">
		<a href="#" class="current">Home</a>
		&nbsp;
		<a href="#">About</a>
		&nbsp;
		<a href="#">Folio</a>
		&nbsp;
		<a href="#">Resume</a>
		&nbsp;
		<a href="#">Code</a>
		&nbsp;
		<a href="#">Forum</a>
		&nbsp;
		<a href="#">Contact</a>
		&nbsp;
		<a href="#">Links</a>
		</div>
I would like to have a dynamic nav that knows to disable/un-link the current link....

Any help/links/tuts/code would be greatly appreciated!

Thanks! :D
Cheers
Micky
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

look into templating: [devnet]+template* +engine[/devnet]
Post Reply