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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

New to SilverStripe?


Go to End


1656 Views

Avatar
sammahoney

Community Member, 14 Posts

7 June 2008 at 11:39pm

Edited: 08/06/2008 1:10am

I've just installed and set up my first site in SilverStripe. I figured that I might as well post up the basic steps I did to convert the Blackcandy template (that comes with the install) into my own site, so others that are new to SilverStripe might get a heads up on it...I know that there's much more to SilverStripe, but for newcomers it helps to keep things simple...

First of all MAKE SURE YOU SELECT THE BLACKCANDY TEMPLATE WHEN INSTALLING SILVERSTRIPE

The files for the layout etc are all in /themes/blackcandy/ so download that whole folder.

There's one template for the layout of the pages - it's /themes/blackcandy/templates/page.ss

SilverStripe uses it's own filetype - .ss file - but it's basically a HTML file with some extra tags to grab the content. You can drag and drop it into your favourite editor if it won't open by double-clicking.

The CSS files are in /themes/blackcandy/css/ - the main one you want to see is layout.css.

The menu is kept in a separate file - /themes/blackcandy/templates/includes/Navigation.ss - and the page.ss file grabs this - see where it says:

<div id="menu_container">
   <% include Navigation %>
<!-- end #menu_container --></div>

It grabs the content the same way - the $Layout:

 
  <div id="Layout">
    $Layout
  </div>

It seems a bit confusing at first, but basically you just need to make a layout once and then that's it. So just make a single page the way you normally would (using HTML + CSS), then copy and paste the different parts from that to the Blackcandy template and it should work. Don't forget to upload the images you used to /themes/blackcandy/images/ and make sure you reference them from layout.css as follows:

(../images/image_name.jpg)

Good Luck!