Design class

The design class helps with basic page structure such as outputting the html, head and body-tag, and include everything needed for Platform to work.

To render a page, simply do this:

index.php
<?php
Design::renderPagestart('Hello world');
echo '<h1>Hello world</h1>';
Design::renderPageend();

If you want to include your own javascript and/or stylesheets it can be done in two ways:

Design::queueCSSFile('include-file.css');
Design::queueJSFile('include-file.js');
Design::queueJSFile('include-file-2.js');
Design::renderPagestart('Hello world');

or

Design::renderPagestart('Hello world', array('include-file.js', 'include-file-2.js'), 'include-file.css');

It is also possible to include javascript after page rendering started using the shortcut function

Design::JSFile('include-file.js');

Basic Platform styles

If you want to adjust the styles used by platform on its design elements, you can provide a style array, which is an array hashed by specific keywords, where the values are class-names to add to the given platform elements.

The style array can be set by calling Design::setStyleArray() with a proper array.

A list of elements which should be included are here:

KeywordDescriptionDefault value
datarecord_editcomplexThe complex for editing datarecords retrieved by Datarecord::renderEditComplex()platform_autocenter
formfieldAll form fieldsw3-input
file_input_frameThe Iframe used for file fields
platform_tableAll platform tablesplatform_autocenter