In this guide you will learn how to define a Controller class and how they fit into the SilverStripe response and request cycle.


This document contains information for an outdated version and may not be maintained any more. If some of your projects still use this version, consider upgrading as soon as possible.

The Controller class handles the responsibility of delivering the correct outgoing SS_HTTPResponse for a given incoming SS_HTTPRequest. A request is along the lines of a user requesting the homepage and contains information like the URL, any parameters and where they've come from. The response on the other hand is the actual content of the homepage and the HTTP information we want to give back to the user.

Controllers are the main handlers for functionality like interactive forms, rendering the correct templates and performing and navigating around the permission checks on the users actions.

  • Introduction to a Controller

    A brief look at the definition of a Controller, creating actions and how to respond to requests.

  • Routing

    A more in depth look at how to map requests to particular controllers and actions.

  • Access Control

    Define allowed behavior and add permission based checks to your Controllers.

  • Redirection

    Move users around your site using automatic redirection.

  • Request Filters

    Create objects for modifying request and response objects across controllers.

API Documentation

Was this article helpful?