silverstripeltd/startup-theme-components

PHP components and dependencies for the Silverstripe Startup theme

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 7

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

pkg:composer/silverstripeltd/startup-theme-components

1.1.0 2025-11-10 21:42 UTC

This package is not auto-updated.

Last update: 2025-11-24 22:05:20 UTC


README

This module extends the Startup theme with some commonly used modules, and some example models to get you started.

Installation

This module should be installed as part of a clean Silverstripe project if you'd like all the default content to be created.

This guide assumes you have Composer installed, as well as knowlege of running a webserver with PHP and a database.

In the CLI, navigate to the folder where you want to create your Silverstripe project.

Create a new Silverstripe project via composer:

composer create-project silverstripe/installer {my-project}

Navigate to your project folder:

cd {my-project}

Point your webserver root to the public folder inside your project folder.

Then require the startup-theme-components module:

composer require silverstripeltd/startup-theme-components

As with most Silverstripe modules, you'll need to then build the database fields.

vendor/bin/sake db:build

As part of the build process, this module will move its theme files into your project's root themes folder. It will also augment the default startup-theme CSS folder with some additional files from this module. In your project's app/_config/theme.yml file, add the startup-theme-components theme as the default theme. Your config should look something like this:

---
Name: mytheme
---
SilverStripe\View\SSViewer:
  themes:
    - 'startup-theme-components'
    - 'startup-theme'
    - '$public'
    - '$default'

You can now modify and extend the theme as you like. See here for more information on customising themes.

Now set up your .env file as required, see the quick start guide

Included Modules

Silverstripe Elemental

The Elemental module is a popular and essential add-on to Silverstripe CMS. It replaces the standard Content field on a page with an ElementalArea field. This enables content authors to compose webpages from sets of Elements - also known as Blocks. Find the full developer documentation for Elemental here.

Startup Theme Components (STC) already has some basic Elemental setup. We have created a Blocks Page model found at src/PageTypes/BlocksPage.php, and this has the DNADesign\Elemental\Extensions\ElementalPageExtension applied (see _config.startup.yml to see extension configurations). Add a Blocks Page via the CMS and add blocks to the page. STC comes with pre-defined block types: Content Block and Image & Text Block. For information on creating custom block types, see the documentation.

Silverstripe Menu Manager

Menu Manager lets you define custom menus in the CMS, and use them in templates. STC ships with a Main Menu and a Footer Menu, edit these via the "Menus" link in the CMS admin. For more info on creating new menus, check the README.

FocusPoint

FocusPoint allows content authors to define a focal point for images, so that images are cropped intelligently when resampled. Consult the README for detailed usaged instructions.

Other customisations

There have been some other useful extensions added to core Silverstripe models, to demonstrate how their data can be customised.

  • Site Config Extension - The Site Config has been extended to include a field for the footer copyright line, and a custom link button for the site header. Site Config extensions are very useful for providing global data, so you'll find one in almost every Silverstripe project.
  • Page Extension - An Intro field and option to hide the sibling menu are added to the base Page type.
  • Image Extension - Adds a field to customise the alt attribute for images.