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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Startpage without navigation


Go to End


4 Posts   1440 Views

Avatar
HanSolo

Community Member, 87 Posts

6 August 2009 at 10:19pm

Edited: 30/03/2010 12:50am

I wonder if it is possible to have a startpage without the navigation menu, what I want is a flashintro.

Regards
Joakim

Avatar
Willr

Forum Moderator, 5523 Posts

8 August 2009 at 8:19pm

Yes this is your homepage so you could do

<% if Page(home) %>
// show something on the home
<% else %>
// show the usual thing
<% end_if %>

Avatar
HanSolo

Community Member, 87 Posts

28 July 2010 at 11:37pm

Hi will, I wonder about that code, becaus I want one page with different background color than the other pages, i tried to implenet it on themes/wines/templates/layout/page.ss So what i did was

<% if Page(Hem) %>
<div id="Content-Container2">
<% else %>
<div id="Content-Container">
<% end_if %>

But that made all the pages have the different backgr color.

Is if page(Hem) is the the Hem the name of the page in the cms?

Joakim

Avatar
Willr

Forum Moderator, 5523 Posts

29 July 2010 at 10:51am

I think the issue is Page() says If one of these pages exists... To get the current page you could use the URLSegment

<% if URLSegment = Hem %>.... <% else %> <% end_if %>