Forums

This topic is locked

Down Image not working

Posted 01 Dec 2004 17:04:48
1
has voted
01 Dec 2004 17:04:48 Damian Castillo posted:
Hello Guru's

I created a navbar in DW MX 2004. I used the Insert>Image Objects>Navigation Bar command. I choose the Up, Over and Down image. I link it to a page. The navbar works just fine but the down image never works. I created a very simple page with the navbar. I then created another page with the same navbar and one line of text to test it. When I click on the button on the index.htm page it finds and loads the second page with the same navbar, but the button is not in the down state.

I know you can set the option to load the page with the image in the down state, but I originally had the problem when creating a Template. I don't want the navbar to be an editable region, but I want it to update the down image when visiting the page from each button.

Is this possible with templates?

Thanks.

Replies

Replied 01 Dec 2004 19:53:12
01 Dec 2004 19:53:12 Simon Martin replied:
You could build your Nav Bar using a list and set each page with a down state all with CSS and have that work with templates.
I wont bang on about how to style <ul> elements to have them appear in a row as there are lots of tutorials about on that subject...
as well as your normal link, visited and active states if you set
#nav a:hover, #nav a.current:link, #nav a.current:visited
with your hover state then you can apply the current class to your navigation elements

In your template add this line
<!-- TemplateParam name="Main Navigation" type="text" value="default" -->
and add a bit of code to each option
<li><a @@((_document['Main Navigation']=='Home') ? 'class="current"' : '')@@ href="../index.htm">Home</a></li>
<li><a @@((_document['Main Navigation']=='Petrol Engines') ? 'class="current"' : '')@@ href="../petrol/petrol.htm">Petrol Engines</a></li>

Then in each of your pages built from your template if you select Modify>Template Properties and add the relevant value e.g. on all my page on petrol engines I've added 'Petrol Engines'
This adds a line to the templated page
<!-- InstanceParam name="Main Navigation" type="text" value="Petrol Engines" -->

Does that make sense?


Live the life you love
Love the life you live

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]

Reply to this topic