Journal

Keeping Navigation Current with PHP

  • Posted on: November 24, 2003
  • In: CSS
  • Comments closed

Good article on ALA abut consistent current navigation using php variables as page types. It’s one of those articles you read and go, “oh yeah” that makes sense.

It’s something that i’ve wrangled with for a while - how to get CSS down-states from just one php include. This shows you how.

Comments

Just a slight amendment.

I’ll be looking at using this technique when I roll out the other sections. Maybe this will allow me to use just one MT blog to control all the sections in this site. Ooooo - now theres a challenge.

Mark's Gravatar

Mark
Mon 24th Nov 2003
at 1:05 am

Just done this on this site. The navigation is now a php include with a bunch of logic statements which, depending on the page variable label, display a class of link which defines it as the “current tab”. Easy.

I’ve also externalised all the template files now into .tmpl files. This will allow me to simply use those templates for other sections within this site. The css is also externalised to a higher directory for use on the other blogs.

Mark's Gravatar

Mark
Wed 26th Nov 2003
at 2:29 am

Commenting is not available in this section entry.

A picture of Mark BoultonI'm a graphic designer from near Cardiff in the UK. I've been a designer for over ten years now and primarily work on the web. I'm still partial to a bit of print every now and then though. I used to work for Agency.com in London as an Art Director before working as a Senior Designer for the BBC in sunny Cardiff. This was all before I took leave of my senses and formed my own design consultancy, Mark Boulton Design Ltd.

I've got a thing about grids and typography and occasionally ramble on about them to anyone who will listen.

If you're after simple, clean and effective web design; let me know.