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

Startpage without navigation


Reply

4 Posts   1079 Views

Avatar
HanSolo

6 August 2009 at 10:19pm (Last edited: 30 March 2010 12:50am), Community Member, 83 Posts

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

Regards
Joakim

Avatar
Willr

8 August 2009 at 8:19pm Forum Moderator, 5511 Posts

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

28 July 2010 at 11:37pm Community Member, 83 Posts

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

29 July 2010 at 10:51am Forum Moderator, 5511 Posts

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 %>