Zones and pages
ImpressPages CMS system doesn't manage separate pages by itself. For this task special modules are created that is called zones. Each zone may have any number of pages with any content. CMS only finds currently required zone (by specified url) and asks it to return the content.
Where to control available zones of my website?
You can control a list of zones in administration panel on tab Developer -> Zones. Here you can create / delete / update zones. By default system has 6 zones:
- Top - top menu and pages in it
- Left - left menu and pages in it
- Search - search result pages
- RSS - RSS feed pages
- Sitemap - sitemap page
- Newsletter - newsletter pages
How to create a new zone?
In Developer -> Zones tab press "New Record" and insert the following data:
- Name - any meaningful name
- Key - string that will uniquely identify this zone in PHP code
- Template - template file that will be used to display pages from this zone
- Associated module group and name - group and name of module that will be responsible to supply information about the pages inside this zone
Fields Associated module group and Associated module are the most important and require additional explanation. Here you specify exact module that will be responsible for pages inside this zone.
If you enter group "standard" and module "content_management" this zone will be available in Menu management tab and will be managed using drag and drop functionality.
If you enter group "administrator" and module "sitemap" this zone will have one automatically generated page that represents the sitemap of the whole website.
You can create your own zone class and supply required pages to the system.
All pages in one zone has the same prefix: www.example.com/en/zone-url. Zone url is automatically generated by zone name on creation. You can change it by using Standard -> SEO tab.
Read more about ImpressPages CMS URL structure.
Why it's done in this way?
This technique allows the system (and each plugin) to have all information about the website. It means that your new plugin will smoothly integrate with all default website functionality:
- menu generation
Also you can execute following operations on other plugins that are created by other developers using standard functions and without knowing anything specific about them:
- list all pages
- get links to those pages
- get content of those pages