This section list every possible way to easily extend and customize your PrestaCMS application.

As we use Symfony 2 you should have a look at the documentation :

Make custom block type

Make custom block types is the first thing to do to fit your needs.

Every step to create a new block type are detailed in the block model section.

If you want to go a step further with block, you should check the working with models section.

Override default classes

In PrestaCMS, services and models classes are declared with parameters.

That means that if you need to override a special class, you just have to override the corresponding parameter in your application.

With this way you can easily extends :

  • factory
  • models
  • page types
  • block types

For example, one common thing to do is to extends page factory. This is the best way to add default blocks to your pages.

To do this, just override the factory class name in your configuration :

In app/config/bundles/presta_cms_core.yml or any bundle configuration or service declaration :

    presta_cms.page.factory.class: Application\Presta\CMSCoreBundle\Factory\PageFactory

Now you can create your own factory. Have a look at the sandbox one for a working example.

If you need something else, please ask it or make a pull request.


[ WIP ]

Make a theme

Building a custom theme is a huge topic.

→ We made a special theming guide for this.

Override templates

Overriding templates can be a easy way to customize block rendering.

As we use Symfony 2 you should have a look at the documentation :

Make page types

If all of this is not enough page types should be what you need.

This is the end of developer guide documentation.

Now if you want to go deeper, you should have a look at the documentation of projects we used.

→ To help your research we made a Useful documentation page.

Want do contribute ? Just fork and edit it!