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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

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


Go to End


3 Posts   864 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
bummzack

Community Member, 904 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 :)