Hi,
I have a template with a vertical navigation that uses wayfinder and works just fine.
I also have a top navigation comprising 5 links...what’s the best way to include this into the site?
Each of the top links has an ’active’ state and so i need to add this class to each of the five pages, but do i have to create 5 tv’s and add the tv variable name to each of the pages i create i.e. {*home*}, {*about*}?
...in which case how do i lock down that part of the page so the client doesn’t accidently delete it, or is there a better way to do this?
Can post code if it helps?
Thanks for any help
J
www.9thwave.co.uk
WEB | DESIGN | PRINT
Hi,
Thanks for your quick response.
So i can add 2 lots of wayfinder calls like this (in it’s most basic form)...
[[Wayfinder? &startId=`0’]] - so this would be for the 5 top links.
[[Wayfinder? &startId=`5’]] - this would be for the vertical menu.
Is that correct?...because it just doesn’t seem to work for me. Both menus disappear and i’ve tried duplicating the wayfinder snippet and renaming ’wayfinder2’...but still no menus appear!!!
..and is the class of ’active’ that wayfinder recognises or is it ’current’?
Thanks for your help
www.9thwave.co.uk
WEB | DESIGN | PRINT
-
☆ A M B ☆
- 24,524 Posts
It looks like you have single quotes instead of backticks. It should be
[[Wayfinder? &startId=`0`]]
etc...
Backticks for sure! Also make sure that all pages are published and that they are accessible.
Hi,
Thanks once again for getting back to me.
I’ve looked at the code, changed the backticks and still the menus do not show.
However, i am wondering if it has something to do with having spans in the top menu...
#nav ul {
display: block;
float: right;
height: 25px;
list-style: none;
margin: 81px 0 0;
padding: 0;
}
#nav ul li {
display: inline;
float: left;
margin: 0 0 0 2px;
}
#nav ul li a {
background: url(images/nav-tab.gif) no-repeat 0px 0px;
display: block;
height: 25px;
width: 90px;
}
#nav ul li a span {
cursor: pointer;
display: block;
font-size: 11px;
font-weight: bold;
height: 25px;
line-height: 25px;
text-align: center;
width: 90px;
}
#nav ul li a:hover,
#nav ul li.active a {
background-position: 0px -25px;
color: #fff;
}
#nav ul li.active a span {
background: url(images/nav-arrow.gif) no-repeat top center;
}
...because this isn’t a straight unordered list does it mean i need to add a chunk to the wayfinder call?
thanks again for taking the time...very much appreciated.
www.9thwave.co.uk
WEB | DESIGN | PRINT
Hi,
The wayfinder calls that i am using are the most basic just so i could get the menus displaying first off, so all i’m using is:
<div id="nav"> [[Wayfinder? &startId=`0`]] </div> - top menu
[[Wayfinder? &startId=`5`]] - vertical menu (this one is just placed within the first part of a sidebar div)
It is just the top menu that doesn’t display, the html is:
<ul>
<li class="active"><a href="#"><span>Home</span></a></li>
<li><a href="#"><span>About</span></a></li>
<li><a href="#"><span>News</span></a></li>
<li><a href="#"><span>Links</span></a></li>
<li><a href="#"><span>Contacts</span></a></li>
</ul>
...but i think it may be like you say and i have to find which chunk to add to include the span to the default...
I’ve tried this??
<li[+wf.classes+]>
<span><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></span>
</li>
..with the call of &rowTpl, but it still doesn’t work.
I thought i’d got it....what am i doing wrong?:-(
thank you.
www.9thwave.co.uk
WEB | DESIGN | PRINT
What happens if you clear the cache, or use uncached calls? [!Wayfinder!]
Also try adding &debug=`true` temporarily to each call.
Hi Ganesh,
Hmmm...that doesn’t appear to work either.
Is my wayfinder call correct:
I have a chunk called topNav:
<li[+wf.classes+]>
<span><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></span>
</li>
call:
[!Wayfinder? &startId=`0`&rowTpl=`topNav`!]
www.9thwave.co.uk
WEB | DESIGN | PRINT