PacktLib: SilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide

SilverStripe 2.4 Module Extension, Themes, and Widgets


About the Author

About the Reviewers


Principles and Concepts

Why SilverStripe

The file structure

SilverStripe's ecosystem


Customizing the Layout

Templates and themes

Time for action—change the default theme

Template engine

Taking a look at BlackCandy

Time for action—using site title and slogan

Page control overview


Getting "Control" of Your System

Model View Controller (MVC)

Structure of a Page

Using the Controller

Time for action—adding a print style

Time for action—reducing HTTP requests for CSS files

Time for action—add your own head tags

Time for action—adding custom JavaScript in the Controller

Time for action—removing JavaScript in the Controller

Coding conventions

Spam protecting e-mail addresses

URL variables and parameters

Adding an Intro page


Storing and Retrieving Information


Time for action—installing DBPlumber

From a database's point of view

Adding custom fields to a page

Time for action—putting content into the database

More data types and their form fields

Global custom fields

How database values are fetched

Taking the Model further

Managing relations

Time for action—linking pages together


Customizing Your Installation

Configuration in general




Adding Some Spice with Widgets and Short Codes

Widget or short code?

Creating our own widget

Time for action—embracing Facebook

More widgets

Have a go hero—Twitter

Text parser

Time for action—doing it "right"


Partial caching

Time for action—caching

Creating our own short code

Time for action—how to find us


Advancing Further with Inheritance and Modules

Enhancing the intro page

Time for action—adding the required modules

Time for action—extending the backend functionality


Introducing Forms

Building a contact form

Time for action—creating a basic contact form

Renting a table

Time for action—extending our form with abstraction


Taking Forms a Step Further

Searching our pages

Time for action—adding search functionality to our page

Customizing forms even further

Saving data to the database

Time for action—extending the member card form

Field types overview

Checking the e-mail address for uniqueness

Time for action—checking the e-mail's uniqueness with Ajax

Doing more with sessions

Time for action—using the session in forms

How to store members in the database


Targeting the Whole World

Globalization in general

Globalization in the CMS

Time for action—configuring the CMS for globalization

Globalization in the code

Time for action—globalizing the intro page

Time for action—translating the rent form

Time for action—translating the rent form's JavaScript

Getting the right content

Time for action—switching the locale

Where to go from here


Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers