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

One Page Website.


4 Posts   521 Views


26 November 2013 at 2:39am (Last edited: 26 November 2013 2:57am), Community Member, 3 Posts

Hi all.

I have a question for all of you.

Which is the best solution to develop a one page website in Silverstripe ?

For example:
I thought, to make use of '<% include %>'
something like this: <% include Page_Type(Class Name)_content %>
so basically I have a .ss inlude file for each page type, where I will have different layout structure.
This is my third project in silverstripe and first one with design (One Page).


27 November 2013 at 9:25pm Community Member, 12 Posts

I made an own class for my home, which I called home. Then I created children of this with all the content.

In my I have this:

<% loop Children %>
<div id="$URLSegment" class="span12">
<% end_loop%>

Worked out great for me. Good luck with your project :)


28 November 2013 at 12:28am Community Member, 3 Posts

Thanks for the suggestion,
I think that your solution is much better than mine, I will give it a try.


16 July 2014 at 3:41am Community Member, 1 Post

How do you add an anchor tag to the children that are displayed on the one page website and then reference those anchors in the primary navigation menu?