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

Test template

parent 6fc347d3
* 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
* 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 <>
* @license GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd
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.
$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">
<td>{{block type="title" id="tpl_title"}}</td>
<td>{{block type="author" id="tpl_author"}}</td>
<td>{{block type="description" id="tpl_description"}}</td>
<td>{{block type="label" id="tpl_label"}}</td>
<th>Two Labels, side by side (using spans)</th>
{{block type="label" id="tpl_label1" tagtype="span"}}
{{block type="label" id="tpl_label2" tagtype="span"}}
<th>Generic artefact block</th>
<td>{{block type="artefact" id="tpl_generic"}}</td>
<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>
<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>
<th>Two profile-constrained artefacts as spans side by side (default to firstname and lastname).</th>
{{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"}}
<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"}}
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