17488 Posts in 4473 Topics by 1978 members
|Go to End|
7 June 2008 at 11:39pm Last edited: 8 June 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:
<% include Navigation %>
<!-- end #menu_container --></div>
It grabs the content the same way - the $Layout:
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:
|Go to Top|