21301 Posts in 5735 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 696 Views |
-
If page type

23 June 2009 at 8:53am
I am creating a simple custom menu template named TopMenu.ss and I want to set the css class to "selected" if the page type is "fooBar"
Obviously, this does not work:
<% if Page_Type== "red" %>class="selected"<% else %>class="notSelected"<% end_if %>
-
Re: If page type

23 June 2009 at 10:00am Last edited: 23 June 2009 10:01am
<% If Class = MyPageClass %>class="foo"<% else %>class="bar"<% end_if %>
-
Re: If page type

23 June 2009 at 9:14pm
Hamish, your idea does not work. It gives a parsing error! So I modified it but my code still does not work.
Any more ideas? Thanks!<% if class == "IndexPage" %>class="foo"<% else %>class="bar"<% end_if %>
-
Re: If page type

23 June 2009 at 10:44pm
Here is the correct code:
<% if ClassName = MyPageClass %>class="foo"<% else %>class="bar"<% end_if %>
| 696 Views | ||
|
Page:
1
|
Go to Top |


