| | |
|
|
|
Re: Focusing Menu Items in Templates |
| message from Murray *TMM* on 15 Jul 2004 |
Use CSS for an easy way to do this.
Check http://www.therobertshouse.com/index.asp to see how I have done it
(look at the code).
I give each button an identifier -
<a href="index.asp" id="button1" title="The Roberts House Home Link"><img
src="/images/homebutt.gif" width="110" height="20" border="0" alt="The
Roberts House Home Link"></a><a href="r_rooms.asp" id="button2" title="The
Roberts House Rooms and Rates Link">
(the id attribute)
I put a stylesheet in the editable region of the head of the template
document -
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
a#button1:link, a#button1:visited, a#button1:hover {
background-position: 34px -150px;
|
| Billy Francisco replied to Murray *TMM* on 15 Jul 2004 |
Thanks Murray, for the good idea.
Definitey easy, but maybe there's an easier (or harder but not requiring
editing on each page) way? I'm guessing, but shouldn't it be possible to assign
a class or id to an element according to the current url? Shouldn't we be able
to say "if url=burron3page.html then class of button3 = "focused" else class of
button3="notFocused" and so on through all the buttons. This make any sense?
|
| Murray *TMM* replied to Billy Francisco on 15 Jul 2004 |
Certainly - you can do such things with server-scripting based on the URL
being requested. You can also do such things with template logic, but *not*
without making a change to each page. In other words, you could have a
template parameter like this (in the Template page) -
<!-- TemplateParam name="buttonNum" type="text" value="1">
and then below that (but still in the head region) have this -
<style type="text/css">
<!--
a#button@@(buttonNum)@@:link, a#button@@(buttonNum)@@:visited,
a#button@@(buttonNum)@@:hover {
background-position: 34px -150px;
|
|
Archived message: Re: Focusing Menu Items in Templates (Macromedia Dreamweaver Web Design)