Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Can I check on my top page.ss if it is the homepage?


Reply


3 Posts   683 Views

Avatar
zim

Community Member, 135 Posts

13 November 2009 at 6:35am

Can I check on my top page.ss if it is the homepage being displayed?

Avatar
banal

Community Member, 901 Posts

13 November 2009 at 7:07am

There are several possibilities to do so.
If your Home-Page has a special Class (eg. HomePage), then you could check like this:
<% if ClassName = HomePage %>

Or you could use the URLSegment
<% if URLSegment = home %>

Avatar
zim

Community Member, 135 Posts

13 November 2009 at 10:29am

Perfect. Thanks :)