root/devel/mod/sidebar/default_templates.php

Revision 1539, 1.8 kB (checked in by renato, 10 months ago)

Setting prop svn:eol-style in LOTS of files.

  • Property svn:eol-style set to native
Line 
1 <?php
2 /**
3  * Sidebar plugin
4  * $id$
5  *
6  * @copyright Copyright (c) 2007 Pro Soft Resources Inc. http://www.prosoftpeople.com
7  * @author Rolando Espinoza La fuente <rho@prosoftpeople.com>
8  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
9  */
10
11 global $template;
12 global $template_definition;
13
14 $template_definition[] = array(
15     'id' => 'sidebar:wrap',
16     'name' => __gettext('Sidebar holder wrap'),
17     'description' => __gettext('Sidebar'),
18     'glossary' => array(
19         '{{body}}' => __gettext('Sidebar body'),
20         ),
21     );
22
23 $sidebar_wrap = <<< END
24
25 <div id="sidebar-holder">
26     {{body}}
27 </div>
28 END;
29
30
31 // override legacy sidebarholder template
32 $template_definition[] = array(
33     'id' => 'sidebarholder',
34     'name' => __gettext('Sidebar boxholder'),
35     'description' => __gettext('Content for each block'),
36     'glossary' => array(
37         '{{title}}' => __gettext('Title of block'),
38         '{{body}}' => __gettext('Body of block'),
39         ),
40     );
41
42 $sidebarholder = <<< END
43     <div class="sidebar-title">
44         <h2>{{title}}</h2>
45     </div>
46
47     <div class="sidebar-body">
48         {{body}}
49     </div>
50 END;
51
52 // block wrapper
53 $template_definition[] = array(
54     'id' => 'sidebar:block',
55     'name' => __gettext('Sidebar block'),
56     'description' => __gettext('Sidebar block holder'),
57     'glossary' => array(
58         '{{id}}' => __gettext('CSS id'),
59         '{{class}}' => __gettext('CSS class'),
60         '{{body}}' => __gettext('Body of block'),
61         ),
62     );
63
64
65 $sidebar_block = <<< END
66
67 <div id="{{id}}" class="sidebar-block {{class}}">
68     {{body}}
69 </div>
70 END;
71
72 // add templates and override if exists
73 templates_add_context('sidebar:wrap', $sidebar_wrap, false, true);
74 templates_add_context('sidebarholder', $sidebarholder, false, true);
75 templates_add_context('sidebar:block', $sidebar_block, false, true);
76
77 ?>
78
Note: See TracBrowser for help on using the browser.