Page Composition
Composing Pages
With Maxscape pages are composed of templates, elements and scripts stored in the content database. Templates are used to specify the general layout. Elements and function calls could easily be embedded in template elements and vice versa.
Page Request
Pages are referred to by the CGI QUERY_STRING variables 'Category' and 'Page'.
For example, the page you are looking at, is referred to by:
<a href="?Category=/Profile/Content&Page=Pages">...</a>:
The Category and Pag' variables corresponds to the NODE_CATEGORY and NODE_NAME fields of the'NODE table. These fields are primary keys used to fetch the page number (NODE_NUMBER) and other data describing the page:
Page Context
The page context is given by the HTTP request (CGI variables), the user profile and the data describing the page type:
- page category, name and number
- page generation type
- content type
- template type and name
- owner, group
- creation, modification time
- ...
Page and Context Classes
The 'Page' and the 'Context' classes implements the required functions and offers an API to be used in applications.
Page Elements
Page elements are used to store the page content and scripts. Elements are stored in the ELEMENT database table.
Page Callbacks
At several stages of the page generation process callback functions could be plugged in.
Page Generation Function
After assembly of the page context, the templates and elements, a dynamic page is generated by a page generation function. Depending on the generation type, the generation function is predefined, must be configured or must be implemented by the user.