PHPackages                             bummzack/page-blocks - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bummzack/page-blocks

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

bummzack/page-blocks
====================

Modular content-blocks for SilverStripe pages

1.0.4(8y ago)155.3k11[2 issues](https://github.com/bummzack/page-blocks/issues)[1 PRs](https://github.com/bummzack/page-blocks/pulls)BSD-3-ClausePHP

Since Oct 22Pushed 7y ago4 watchersCompare

[ Source](https://github.com/bummzack/page-blocks)[ Packagist](https://packagist.org/packages/bummzack/page-blocks)[ Docs](http://github.com/bummzack/page-blocks)[ RSS](/packages/bummzack-page-blocks/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (6)Used By (0)

Page-Blocks for SilverStripe
============================

[](#page-blocks-for-silverstripe)

**IMPORTANT:** This module is currently work-in-progress and is subject to major changes or refactoring. Here's the current [TODO](TODO.md).

Please feel free to create pull-requests (especially for things in the TODO) or open issues with new ideas/requests.

What is this?
-------------

[](#what-is-this)

Page-Blocks is a Module that adds content to a SilverStripe page in a modular way. Ever had a client that wanted some text, followed by a gallery, some more text and then a video?

You can do some of these things by allowing the user to insert videos and images directly into the content-editor (TinyMCE), but you'll lose control over the website-design.

The goal of this module is to allow flexible page-designs, while giving you full control over the design of the content. It's also great for single-page websites.

This module should be light-weight and extensible. We provide the backend integration, while **you** have to care about the frontend (we won't ship another gallery module). This isn't a all-round carefree package, but we provide some basic templates and (hopefully) a good documentation.

Requirements
------------

[](#requirements)

#### Mandatory

[](#mandatory)

- [SilverStripe 3.1 or 3.2](https://docs.silverstripe.org/en/3.2/getting_started/composer/)
- [GridField Bulk Editing Tools](https://github.com/colymba/GridFieldBulkEditingTools)
- [GridField Extensions](https://github.com/silverstripe-australia/silverstripe-gridfieldextensions)

#### Optional (for a better experience)

[](#optional-for-a-better-experience)

These will be installed when installing the module via composer.

- [sortablefile](https://github.com/bummzack/sortablefile) (attach many images and sort them with drag'n'drop)
- [Better Buttons for GridField](https://github.com/unclecheese/silverstripe-gridfield-betterbuttons) (better buttons in your gridfield records. Allows you to save/publish directly within the blocks instead of using the bulk-manager actions).

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

[](#installation)

Use [composer](https://getcomposer.org/) to install the module and all its dependencies.

```
composer require bummzack/page-blocks

```

If the above fails (composer complains about no matching packages when resolving requirements), then open up your `composer.json` file and add `"minimum-stability": "dev"` in the "root" of the JSON structure:

```
{
    "minimum-stability": "dev",
    ...
}

```

After doing so, run the composer require command again and it should successfully install the module and all requirements.

If you don't use composer, make sure you install at least the modules that are listed as "mandatory" under **Requirements**

After installing, make sure you rebuild the database and flush the cache (`dev/build?flush=1`).

**Important:** Your CMS won't change at all after the installation. You first have to configure the module. Read on.

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

[](#configuration)

The most important step is to add the `PageBlocks` extension to your page-types. It's up to you to decide which page-type should have blocks. For example you could create a custom Page named `BlockPage`. Here's a complete class listing for such a page:

```
