Create a template

1. metadata configuration

Template metadata are described in the API documentation.

2. Template variation configuration

You can optionnaly define a template variation configuration if your template is customisable by context.

3. View file creation

File location depends on the file key configured in the metadata.config.php file.

Inside the template, some variable can be accessed:

$wysiwyg:A hash which keys are the WYSIWYG name configured in the metadata.config.php file and values are content the user entered.
$page:Nos\model_Page instance.
$title:The title to put in a h1 tag
$main_controller:
 Front controller instance.
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href="static/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="static/apps/noviusos_templates_basic/css/base.css" media="all">
</head>

<body>

    <header>This header will be displayed on all pages configured to use this template.</header>

    <div id="menu">
    </div>

    <div id="content">
        <?= $wysiwyg['content']; ?>
    </div>

</body>
</html>
Read the Docs v: elche
Versions
latest
elche
dubrovka
chiba.2
chiba.1
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.