Understanding key concepts
PrestaCMS is made to handle multiple website so the first step is to create a website which will be the entry point for all its content structure.
PrestaCMS use configuration to load websites.
Each website can have different languages and different environment (staging), each one bind to a given url. That means that you have to configure the locale, environment and website for each urls.
Each page of your site handle by PrestaCMS correspond to a Page model.
Page model can have different types, PrestaCMS core basic type is called ‘cms_type’. Page is divided into “Zone” and each zone can store a collection of blocks.
Page use templates to define their zone and block structure.
PrestaCMS core defines basic blocks : Simple, Sitemap, PageChildren and Breadcrumb.
PrestaCMS page type system make it easy to customize. You can create new types of page and declare new tabs for administrate it.
Menu system is based on the CMFMenuBundle. Every menu have several menu nodes which are linked to pages. You can use several menus for a website, for example : main navigation, footer navigation…
A page must by linked to a route to be reachable. A page will have a route for each of its language version.
For example :
are two urls. Each one corresponding to a route.
Each route are linked to the about page which is rendered in english or french depending on website configuration.
So if you follow, in that case we have :
- one website : /website/sandbox
- one page : /website/sandbox/page/about
- two routes (one by language)
Theme system took some inspiration in Drupal one.
Theme have two goals :
the first one is obviously form design purpose. It allows you to centralize designer and web integrator codes and to provide multiple design for your sites.
the second one is to centralize content which is present on all your site. For example a footer or header block.
Themes have a dedicated administration area.
You can find more information about themes in the Theming guide.
As you can see PrestaCMS use several models to render a website.
Most of the time, professionals websites have defined structure and type of page. That’s why we never start from an empty website and begin with greating fixtures to build the page structure, the menus, the routing and page template structure (ie: zone and blocks).
As this is you need to understand how PrestaCMS works before building your data, we suggest you to follow next section of this guide before coding your fixtures.
→ Let’s continue with the block system.