Building a Silverstripe Page Elements template for Web designers
Howto Create a
Page Elements Template
A working setup of General
Silverstripe CMS understanding of
A copy of the page- HTML
elements module CSS
extracted in the root Web Design
Open the “blackcandy/” folder in “themes/”
Look in Page.ss:
“$Layout” is where the template will be inserted.
Doesn't work for you?
Create a copy “Gridpage.ss” and modify it.
Have a look at the documentation Silverstripe
provides about the powerfull template engine:
Creating the template file
Create a new file called “GridPage_test.ss” in
This file will be inserted in Page.ss in $Layout
Create the html layout in your favorite Editor.
Building the Layout
Put “$Slot()” as placeholders in the dynamic
Think about a useful name for these areas:
“MainContent”, “LeftSidebar”, “Tagline” etc
Put these names inside the bracket:
Slotnames should be short and useful.
They must be unique across the file (not the
It makes sense using the same name for
simmilar areas on different templates.
Login to the Admin interface in Silverstripe
Select the page you wish to edit
In the behavior tab ensure that the pagetype is
set to “GridPage”
Select your template in the Dropdown menu.
You should see the layout editor in the Content
Start adding elements in the Slots and putting
your site together.
Questions, Comments, Ideas?