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 about a future release and not the current stable version (4). Be aware that information on this page may change and API's may not be stable for production use.

The Controller class handles the responsibility of delivering the correct outgoing HTTPResponse for a given incoming 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.

  • HTTP Middlewares

    Create objects for modifying request and response objects across controllers.

API Documentation

Was this article helpful?