3214 Posts in 848 Topics by 810 members
|Go to End|
14 September 2011 at 12:54am
i am trying to build a navigation which is supposed to have a different color from a certain point on. I'd like to use ul and ol in my css. SS's output from the menu control should look like this:
<li><a class="current" href="content1.htm" title="title1">Title1</a></li>
<li><a href="content2.htm" title="title2">Title2</a></li>
<li><a href="content3.htm" title="title3">Title3</a></li>
<li><a href="content4.htm" title="title4">Title4</a></li>
<li><a href="content5.htm" title="title5">Title5</a></li>
<li><a href="content6.htm" title="title6">Title6</a></li>
<li><a href="content7.htm" title="title7">Title7</a></li>
All pages content1 - content7 must be on the same level in the sitetree.
Can anybody please lead me to the smartest way to do this?
14 September 2011 at 1:06am
if you allways want to do that after the 4th element and you know there are at least 5 elements you could simply use $Pos:
<% control Menu(1) %>
<% if Pos = 5 %>
<% end_if %>
<li><a class="$LinkOrCurrent" href="$Link" title="$Title.XML">$MenuTitle</a></li>
<% end_control %>
14 September 2011 at 6:31am
Thanks for your help! Unfortunately this is not an option because of flexibilty requirements. Can i just use another class for the pagetype and a syntax like <% if class=foo %> somehow?
14 September 2011 at 7:52am
Yes, you can do that with page class names.
<% if ClassName = YourClassName %>
<% end_if %>
15 September 2011 at 3:19am
Thanks again! I combined both answers and it works perfect.
|Go to Top|