Commit 8e34715f authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Test template

parent 6fc347d3
<?php
/**
* This program is part of Mahara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package mahara
* @subpackage core or plugintype/pluginname
* @author Martyn Smith <martyn@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
$template = new StdClass;
$template->title = 'Test Template';
$template->description = <<<EOF
This template is designed for testing the template rendering and view creation.
It has a variety of different blocks constraining to specific plugins, artefact
types, and rendering types.
EOF;
$template->category = 'professionaldevelopment';
?>
table#test_template {
width: 90%;
margin: 1em;
background-color: #e5e8da;
border: 1px solid #b0b2a8;
border-collapse: collapse;
}
table#test_template th {
width: 30%;
}
table#test_template th,
table#test_template td {
padding: 5px;
}
<table id="test_template">
<tbody>
<tr>
<th>Title</th>
<td>{{block type="title" id="tpl_title"}}</td>
</tr>
<tr>
<th>Author</th>
<td>{{block type="author" id="tpl_author"}}</td>
</tr>
<tr>
<th>Description</th>
<td>{{block type="description" id="tpl_description"}}</td>
</tr>
<tr>
<th>Label</th>
<td>{{block type="label" id="tpl_label"}}</td>
</tr>
<tr>
<th>Two Labels, side by side (using spans)</th>
<td>
{{block type="label" id="tpl_label1" tagtype="span"}}
{{block type="label" id="tpl_label2" tagtype="span"}}
</td>
</tr>
<tr>
<th>Generic artefact block</th>
<td>{{block type="artefact" id="tpl_generic"}}</td>
</tr>
<tr>
<th>Artefact constrained to and defaulting to an email address</th>
<td>{{block type="artefact" id="tpl_email" artefacttype="email" defaultartefacttype="email" format="renderfull"}}</td>
</tr>
<tr>
<th>Artefact that MUST be a folder, and will be a listing of it's contents</th>
<td>{{block type="artefact" id="tpl_folder" artefacttype="folder" format="listchildren"}}</td>
</tr>
<tr>
<th>Two profile-constrained artefacts as spans side by side (default to firstname and lastname).</th>
<td>
{{block type="artefact" tagtype="span" id="tpl_firstname" defaultartefacttype="firstname" format="renderfull" plugintype="internal"}}
{{block type="artefact" tagtype="span" id="tpl_lastname" defaultartefacttype="lastname" format="renderfull" plugintype="internal"}}
</td>
</tr>
<tr>
<th>Artefact that must be an image, is renderered full, and sized at 320x200</th>
<td>{{block type="artefact" id="tpl_image" width="320" height="200" format="renderfull" artefacttype="image"}}
</tr>
</tbody>
</table>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment