Free Sample
+ Collection

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

Beginner's Guide
Philipp Krenn

Create smashing SilverStripe applications by extending modules, creating themes, and adding widgets
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849515009
Paperback368 pages

About This Book

  • The first and only book that focuses on extending SilverStripe sites
  • Step-by-step instructions covering everything you need to know for getting started with making the most of the core functionality, developing modules, creating themes, and adding widgets
  • Build a fun, real-world example application without breaking a sweat
  • Reviewed by Sigurd Magnusson, co-founder of SilverStripe, and Ingo Schommer, development manager at SilverStripe
  • For more recent updates to the code, please visit the author's own repository at Updated Code Here

Who This Book Is For

If you are a SilverStripe developer and want to learn the nooks and crannies of developing fully-featured SilverStripe web applications with module extensions, themes, and widgets, then this book is for you. Building upon your knowledge of PHP, HTML, and CSS, this book will take you to the next level of SilverStripe development. The book assumes you have basic experience with SilverStripe.

Table of Contents

Chapter 1: Principles and Concepts
Why SilverStripe
The file structure
SilverStripe's ecosystem
Chapter 2: 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
Chapter 3: 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
Chapter 4: 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
Chapter 5: Customizing Your Installation
Configuration in general
Chapter 6: 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
Chapter 7: Advancing Further with Inheritance and Modules
Enhancing the intro page
Time for action—adding the required modules
Time for action—extending the backend functionality
Chapter 8: 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
Chapter 9: 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
Chapter 10: 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

What You Will Learn

  • Convert general HTML and CSS files into SilverStripe templates to create magnificent themes
  • Create and extend different page types, both in terms of look and functionality
  • Enable your content editor to efficiently interact with your system, for instance, adding new images to the image gallery
  • Store user input in the database or send it via e-mail
  • Translate your page and internationalize it – think about the various date formats, for instance
  • Implement common tasks, including search functionality, integration of Google Maps or Facebook, and much more
  • Set up a toolset for common tasks (search functionality, Google Maps, and Facebook)
  • Develop powerful server-side scripts while catering for security and performance

In Detail

HTML, CSS, JavaScript, PHP, databases, frameworks, CMS, and many other fast-evolving technologies make up modern web-development. How can you effectively create stunning results without being limited by the ease of your tools? That's where SilverStripe CMS comes into play.

SilverStripe, with its simple and intuitive design, is easy to work with and offers numerous customization opportunities. But understanding the options available and getting hands-on with the development techniques is not a piece of cake and certainly not a delightful experience if you're relying on tutorials and documentation available online.

Silverstripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide takes you through designing catchy and flexible templates, adding powerful features effortlessly, integrating everything into an intuitive backend for easy administration in a simple way, and implementing nifty features with minimal effort. From the most basic to complex forms, from simple to sophisticated pages, you'll learn how to get the most out of your SilverStripe application. SilverStripe keeps everything nice and simple, but if you need to, you can extend and customize every part of it. Graphic examples illustrate the general principle of operation, gradually introducing the finer details needed to get professional results. Common requirements such as image galleries, site search, and more can be reused or extended to fulfill your needs.

The author's experience in designing and developing SilverStripe projects enables him to share insights on creating professional web applications in a clear and friendly way.

You will start off with creating your own templates – covering the general layout, while also taking search engine optimization into consideration. Next, you will look at the logic driving your web application, and the database. Using these basic concepts, you will start building more advanced features. These include the integration of Google Maps, Twitter and Facebook, image galleries, the handling of user-supplied information, your own full-text search, and more. Finally, you'll even translate and internationalize your project. All of this can be easily achieved with SilverStripe.

All of this and quite a bit more is covered by Silverstripe 2.4 Module Extension, Themes and Widgets: Beginner's Guide. Besides general principles, the focus is on reusable code – getting your project started in no time.


Read More

Recommended for You