PHPackages                             jeffwhitfield/silverstripe-bootstrap-theme - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jeffwhitfield/silverstripe-bootstrap-theme

AbandonedArchivedSilverstripe-theme

jeffwhitfield/silverstripe-bootstrap-theme
==========================================

A SilverStripe Bootstrap theme that incorporates HTML5 Boilerplate, Twitter Bootstrap, and Font Awesome

1.2.0(12y ago)102.2k5[2 issues](https://github.com/jeffwhitfield/silverstripe-bootstrap-theme/issues)[1 PRs](https://github.com/jeffwhitfield/silverstripe-bootstrap-theme/pulls)Apache-2.0Scheme

Since Sep 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jeffwhitfield/silverstripe-bootstrap-theme)[ Packagist](https://packagist.org/packages/jeffwhitfield/silverstripe-bootstrap-theme)[ RSS](/packages/jeffwhitfield-silverstripe-bootstrap-theme/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

SilverStripe Bootstrap Theme v1.2.0
===================================

[](#silverstripe-bootstrap-theme-v120)

A SilverStripe Bootstrap theme that incorporates Twitter Bootstrap and Font Awesome

Installation
------------

[](#installation)

- Install add-on via Composer (`composer require jeffwhitfield/silverstripe-bootstrap-theme dev-master`) OR download a copy from the repository.
- Create a folder of your choice within the `themes/` directory of your SilverStripe project to store your custom theme in.
- If you've downloaded the add-on, copy all files from the repository into this directory.
- If you've installed the add-on using Composer, copy all the files from the `themes/bootstrap` directory into your custom theme directory.
- Run `bower install` within your theme directory.
- Update the `init()` method in your default page controller and add additional methods.

For more information about installation, see Configuration below.

Configuration
-------------

[](#configuration)

The default *bootstrap* theme includes all CSS, javascript, LESS, and template files for the site. It is recommended that you create a new theme and copy all the files from the *bootstrap* directory into your own custom theme directory. This way, if changes are made to the SilverStripe Bootstrap Theme add-on, you'll have a much easier time updating your theme.

In order to use this theme you'll need to do a few things to get started with it:

First, you'll need to run the `bower install` command from within your theme directory. The theme requires that you use Bower to manage jQuery, Modernizr, Bootstrap, and Font Awesome. The benefit of this is that, should any of these components change, you can upgrade them yourself without having to rely on the SilverStripe Bootstrap Theme add-on to be updated. If you require specific versions for these components, update the `bower.json` config file prior to installing the components.

Second, you'll need to run an initial compilation of the LESS files prior to viewing a page. To compile CSS from LESS, you'll need to provide your own LESS pre-processor. For Mac users, [CodeKit](http://incident57.com/codekit/) is recommended. For Windows users, give [Prepros](http://alphapixels.com/prepros/) a try. Be sure to set it so that the resulting CSS files are minified/compressed for production use.

Lastly, you'll need to update your default Page class (`/mysite/code/Page.php`) to allow SilverStripe to control the optimization of all the javascript and CSS. To do this, update the `init()` method in your `Page_Controller` or (whatever default controller you'll be using) with the following code:

```
    public function init() {
        parent::init();
        $ThemeDir =  $this->ThemeDir();
        Requirements::set_write_js_to_body(true);
        Requirements::set_combined_files_folder($ThemeDir.'/_requirements');
        Requirements::combine_files(
            'site.css',
            array(
                $ThemeDir.'/css/site.css',
            )
        );
        Requirements::javascript("//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js");
        Requirements::combine_files(
            'site.js',
            array(
                $ThemeDir.'/javascript/libs.js',
                $ThemeDir.'/bower_components/bootstrap/js/affix.js',
                $ThemeDir.'/bower_components/bootstrap/js/alert.js',
                $ThemeDir.'/bower_components/bootstrap/js/button.js',
                $ThemeDir.'/bower_components/bootstrap/js/carousel.js',
                $ThemeDir.'/bower_components/bootstrap/js/collapse.js',
                $ThemeDir.'/bower_components/bootstrap/js/dropdown.js',
                $ThemeDir.'/bower_components/bootstrap/js/modal.js',
                $ThemeDir.'/bower_components/bootstrap/js/tooltip.js',
                $ThemeDir.'/bower_components/bootstrap/js/popover.js',
                $ThemeDir.'/bower_components/bootstrap/js/scrollspy.js',
                $ThemeDir.'/bower_components/bootstrap/js/tab.js',
                $ThemeDir.'/bower_components/bootstrap/js/transition.js',
                $ThemeDir.'/javascript/main.js'
            )
        );
    }
```

**Note: Pay careful attention to the version of jQuery being loaded in the Requirements! By default, it's set to the version of jQuery that was current at the time this add-on was last updated. If you need to change it, be sure to change it in your `init()` method to match whatever version you are loading up with Bower.**

When the site environment is in *live* mode, all CSS files are combined and saved to `/themes/{$ThemeDir}/_requirements/site.css`. Javascript is combined/compressed to `/themes/{$ThemeDir}/_requirements/site.js`. It is recommended that you add any further javascript and CSS files here to ensure they're properly optimized for better performance. Keep in mind that only javascript receives any compression. While CSS files are concatenated, you'll need to compress the CSS files yourself or use something the like the [Minify CSS Module](https://github.com/nathancox/silverstripe-minify) to compress CSS files on the fly.

In addition to the `init()` method changes, I recommend adding one additional method to your controllers:

```
    public function Copyright($startYear = "", $separator = "-") {
        $currentYear = date('Y');
        if(!empty($startYear)) {
            $output = ($startYear>=$currentYear ? $currentYear : $startYear.$separator.$currentYear);
        } else {
            $output = $currentYear;
        }
        return $output;
    }
```

This a simple Copyright method that is used in the footer template to return a full copyright for the current year.

Bugtracker
----------

[](#bugtracker)

Bugs are tracked on [github.com](https://github.com/jeffwhitfield/silverstripe-bootstrap-theme/issues). Feel free to offer suggestions and contribute to the codebase.

Links
-----

[](#links)

- [SilverStripe](http://www.silverstripe.org)
- [Twitter Bootstrap](http://getbootstrap.com/)
- [Font Awesome](http://fortawesome.github.io/Font-Awesome/)

Changelog
---------

[](#changelog)

[Changelog](https://github.com/jeffwhitfield/silverstripe-bootstrap-theme/blob/master/changelog.md)

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Total

3

Last Release

4453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e92a0a681f11bda89205af8f8233723b8e2354612c005e29599f493f4d397382?d=identicon)[jeffwhitfield](/maintainers/jeffwhitfield)

---

Top Contributors

[![jeffwhitfield](https://avatars.githubusercontent.com/u/274571?v=4)](https://github.com/jeffwhitfield "jeffwhitfield (20 commits)")

---

Tags

silverstripetheme

### Embed Badge

![Health badge](/badges/jeffwhitfield-silverstripe-bootstrap-theme/health.svg)

```
[![Health](https://phpackages.com/badges/jeffwhitfield-silverstripe-bootstrap-theme/health.svg)](https://phpackages.com/packages/jeffwhitfield-silverstripe-bootstrap-theme)
```

###  Alternatives

[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
