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   1139 Views

Avatar
HanSolo

Community Member, 83 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, 5513 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, 83 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, 5513 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 %>