PHPackages                             jaedb/modulemanager - 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. jaedb/modulemanager

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

jaedb/modulemanager
===================

Module Manager for SilverStripe

3.0.2(7y ago)12.4k2[3 issues](https://github.com/jaedb/ModuleManager/issues)[1 PRs](https://github.com/jaedb/ModuleManager/pulls)BSD-3-ClausePHP

Since Aug 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jaedb/ModuleManager)[ Packagist](https://packagist.org/packages/jaedb/modulemanager)[ Docs](http://jamesbarnsley.co.nz)[ RSS](/packages/jaedb-modulemanager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (19)Used By (0)

Description
===========

[](#description)

Manage site-wide modules (aka widgets) and select the pages on which they are to appear. This allows you to repurpose content across your website, and build easily modular content elements.

Dependencies
============

[](#dependencies)

- SilverStripe 4

Installation
============

[](#installation)

1. `composer require jaedb/ModuleManager`
2. Run /dev/build?flush=1
3. Setup your Module Positions. There is an initial `after_content` area setup to get you started.
4. Insert your Module Positions in your template (ie `$ModuleArea(after_content)`)

Usage
=====

[](#usage)

### Create a module area

[](#create-a-module-area)

1. Edit your `app/_config/config.yml` file to add any additional module areas. Use the following format:

```
Jaedb\ModuleManager\ModuleManager:
  positions:
    {ALIAS}: "{NAME}"

```

2. In your template, use the code `$ModulePosition(ALIAS)` where ALIAS is your position's alias string.
3. Run dev/build (`/dev/build?flush=all`)

### Create a module instance

[](#create-a-module-instance)

1. Within the *Module Manager* admin, create a new `Module` object. The *type* dropdown will show the list of available module types.
2. Assign your new `Module` object to one of the positions you configured in `config.yml`.

### Build a custom module type

[](#build-a-custom-module-type)

1. Create a new DataObject file `app/src/Modules/MyModule.php`:

```
