Page 1 of 1

Changing template icon to represent viewing page

Posted: Thu Mar 01, 2007 12:31 am
by knuckles
Hi,

Can any one let me know an easy way to change a css class within a template without making multiple templates. What I am trying to achieve is to change an icon to represent the page you are viewing.

In the template I am calling:

         
                   
              crappy quote!              
       
           
and my css looks like this

#banner .home { background: url(../uploads/images/ico_m_house.jpg) no-repeat }
#banner .about { background: url(../uploads/images/ico_m_people.jpg) no-repeat }
#banner .contact { background: url(../uploads/images/ico_m_paper.jpg) no-repeat }

Mind is at a bit of a blank at the moment.
Thanks

Re: Changing template icon to represent viewing page

Posted: Thu Mar 01, 2007 3:25 am
by chead
How about something like:



You could also do something like:



which would save you the trouble of defining all the classes.

Re: Changing template icon to represent viewing page

Posted: Fri Mar 02, 2007 1:04 am
by knuckles
Thanks for that.

I was unaware of what variables were available and have since found out the {get_template_vars} command.

Cheers,
Knuckles