3215 Posts in 848 Topics by 811 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2084 Views |
-
Position in menu $pos

25 August 2009 at 8:10am
I am using $pos so I know what position i'm in on the menu. I then reference css using menupos$pos. I use <% if LinkingMode = current %> to find out whether the page should be active or not. What I would like to know is how I can test the position i'm at on the menu say:
<% Holdmenupos = $pos %>
<% if Holdmenupos = 1 Then %>
Do something
<% else %>
Do something else
<% end if %>This doesnt however work - in firefox this shows <% Holdmenupos = 1 %> <% Holdmenupos = 2 %> on the page itself .... How would I be able to store and "use" the variable properly in .ss pages?
Thanks
-
Re: Position in menu $pos

25 August 2009 at 9:53am
Hi stevejo
If:
<% if LinkingMode = current %>
works, i don't see why:<% if Pos = 1 %>
wouldn't...Have you tried that?
-
Re: Position in menu $pos

25 August 2009 at 10:05am
Hi and thanks for replying. I have tried that however that would actually translate as <% if 1 = 1 %> as $pos holds the position itself.
Many thanks
-
Re: Position in menu $pos

25 August 2009 at 10:43am Last edited: 26 August 2009 10:05am
I'm not sure i follow. If you do something like:
<% control Menu(1) %>
<% if Pos = 1 %>
...
<% else %>
...
<% end_if %>
<% end_control %>Then for the first menu item it will do the first part of the if statement and the rest will do the else.
If that isn't the type of thing you want to do, can you elaborate a bit more please?
-
Re: Position in menu $pos

26 August 2009 at 8:30am
Sorry I was getting confused with $pos I didnt know that was a "Pos" command.
This is exactly what I was looking for so many many thanks
| 2084 Views | ||
|
Page:
1
|
Go to Top |



