21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 450 Views |
-
What type of page am I?

28 October 2010 at 7:31am
Hi,
Is there a way to check in Page.ss template what page is displayed? or what type of page is displayed, for example HomePage etc.
I'm looking for somethink like <% if Homepage %>
I don't want to change whole template system for one little change on HomePage.
Because this change is in header so I have to do it in main - Page.ss template.Thanks
-
Re: What type of page am I?

28 October 2010 at 8:24am
hi
<% if ClassName == HomePage %> $ClassName <% end_if %>
luk
-
Re: What type of page am I?

28 October 2010 at 10:46am
The equality operator in templates is just =, not ==. Therefore it should be:
<% if ClassName = HomePage %> $ClassName <% end_if %>
-
Re: What type of page am I?

28 October 2010 at 11:57am
You can also use this if you're trying to target a particular page:
<% if URLSegment = page-url %>do something here...<% else %>or something else here...<% end_if %>
| 450 Views | ||
|
Page:
1
|
Go to Top |




