back to blog

Modules can now install Pages and Patterns!

As usual we are always focused on improving the overall workflow productivity of all the admin interactions in Atlantis, so as a result of that with today 1.1.5 release we are introducing some new features that will help you achieve just that!

Modules can now post install automatically generate pages and patterns ( see the screenshot below ). We find this type of interaction very useful especially when you have modules that need "general" and "single type" types of listings. Good example for that will be the Blog module that needs in general 2 pages to operate normally, lets say blog/ and blog/:any. The first shows a listing of all blogs and the latter a single blog entry. Generating these pages is simplified by a click of a button; the proper pages will be generated in your CMS also including the correspondent module calls in their bodies.

To implement what pages or patterns in your Module Setup.php you need to add these arrays to already existings modules. Newly generated modules will have them in their bootstrap code by default.

'create_pages' => [
        'name' => '',
        'url' => '',
        'body' => ''
'create_patterns' => [
        'name' => ',
        'url' => '',
        'language' => 'en',
        'status' => '1',
        'mask' => '',

Also there is now a set of new helper classes under Atlantis\Helpers\Pages and Atlantis\Helpers\Patterns. These are just utility classes which are wrappers for core functionality designed to help you easily generate programatically new Pages and Patterns.

In the coming weeks we will be releasing also updates for all of the suitable modules to reflect this new change. Note that you have to be at least on 1.0.19 in order to use this new feature or the button will not show at all.