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.

Delicious tutorials.

Master SilverStripe, one bite at a time.

 

Versions

4.x (stable) 3.x

All tutorials (22 videos)

Up and Running: Setting up a local SilverStripe dev environment

In this introductory lesson, we cover installing a local webserver (e.g. MAMP), installing and using Composer, and configuring an _ss_environment.php file. Having a finely tuned local...

Creating your first theme

In this tutorial, we’ll cover how to build your first theme in SilverStripe. The SilverStripe installer ships with its own default theme -- Simple, but more...

Migrating static templates into your theme

In this tutorial, we’ll migrate a static site into your SilverStripe project. HTML, CSS, and JavaScript will provide a nice common ground and starting point for...

Adding Dynamic Content

In this tutorial, we’ll start using SilverStripe’s native template syntax to inject dynamic content into our site, such as navigation, page titles, CMS content, and...

Working with Multiple Templates

Typically a site has more than one distinct template used across all pages. The home page, for instance, is likely to have a different layout than...

The holder/page pattern

In this tutorial we’re going to focus on the Travel Guides section of our website for this topic. As we can see in the designs, there...

Adding custom fields to a page

In the previous lesson, we developed a structure for our Travel Guides section that provides a list view of articles, each with a link to their...

Working with Files and Images

In the previous lesson, we started adding some basic custom fields to our Article pages. We’ll now continue working on getting those pages more integrated with...

Introduction to the ORM

In this lesson, we’ll use the backbone of SilverStripe Framework -- the Object Relational Model (ORM) to syndicate content to the home page of our...

Working with data relationships - $has_many

In this lesson, we're going to dig a bit deeper into relational data by introducing some plural relationships with $has_many.

Working with data relationships - $many_many

In this tutorial, we'll add categories to our articles using another type of plural data relationship known as $many_many.

Introduction to frontend forms

In this tutorial we're going to look at adding forms to the frontend of our website. We'll add a new feature that allows users to post...

How to use this guide

What are we building?

These tutorials are published in series, with each lesson demonstrating a new concept in SilverStripe development. To give them context, we have created an imaginary client that we’ll be working for, who needs a custom web application. Their application will allow users to book and list holiday rentals, much like HomeAway or AirBnB, only to give it an element of distinction, all the listings are in Middle Earth. The name of the website is appropriately One Ring Rentals.

Prerequisites

You should have a basic working knowledge of object-oriented PHP and MySQL. If you are new to PHP, we recommend the tutorial at Codecademy. Since the project assumes that a designer has already done all of our HTML and CSS, there will be very little, if any, frontend work.

The format

Each lesson includes a screencast and a written tutorial. They follow each other very closely, and in general, share all the same information. Lessons move through the project in a linear fashion, putting most of the advanced topics further down the track.

Getting the source code

The source code for every lesson is on Github. Each lesson contains a link to its respective branch in the repository. Branches are subdivided into "begin" and "end" states, where the "begin" branch is the state of the code before the lesson begins, and the "end" is how it should look when the lesson is complete.

For example, if you're working on Lesson 11, you'll want to checkout the branch "lesson-11-begin" and follow the tutorial. If you get stuck, or if you want to compare your work to the final outcome, checkout "lesson-11-end".

Getting the database and assets

Each lesson contains a folder named "__assets/" that contains any static files that are relevant to the lesson, as well as the current database. Additionally, uploaded assets (e.g. files added via the CMS) are included in "__assets/assets" (Yes, we are aware how confusing that may seem.) Typically, to get the content into the right state to begin the lesson, you'll want to overwrite your project "assets/" folder with "__assets/assets/" and import the database.sql file to your database. All database clients, such as PHPMyAdmin, Navicat, and Sequel Pro allow you to import SQL scripts very easily. You can also run the script from the command line, using

mysql -u [user] -p[password] [database_name] < __assets/database.sql

Getting support

Write to [email protected]