If working with components still is too limiting a custom page can be created. This might be needed if the browser must serve something else than html (e.g. a generated csv file). In such cases a custom header must be created which interferes with the provided functionality to create html pages.
The solution is to create a new page of type Custom.
This can be done via the CMS when enabling the checkbox Advanced.
A custom page expects a function with the name create_'page_keyword'_page where 'page_keyword' is the keyword of the custom page.
This function must be defined in the file index.php.
The function receives the following parameters:
$router: The router instance which is used to generate valid links (see class Router).$db: The instance of the database handler which grants access to the DB and provides useful methods to access data (see class PageDb).To keep things ordered, this function should create an instance of a new custom page class.
Page classes are stored in the path server/page and it is recommended to create the new page class in this folder.