-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.php
64 lines (51 loc) · 2.05 KB
/
Index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Controller for the intranet
*/
class VIH_Controller_Index extends k_Component
{
public $i18n = array(
'January' => 'januar',
'Februrary' => 'februar',
'March' => 'marts',
'May' => 'maj',
'June' => 'juni',
'July' => 'juli',
'October' => 'oktober'
);
protected $template;
function __construct(k_TemplateFactory $template)
{
$this->template = $template;
}
function renderHtml()
{
$title = 'En højskole for livet';
$meta['description'] = 'Vejle Idrætshøjskole tilbyder forskellige højskolekurser. Vi er en højskole med idrætten som samlingspunkt.';
$meta['keywords'] = 'jyske, idrætsskole, idrætshøjskoler, idrætshøjskole, højskole, højskoler, højskolekursus, højskolekurser, kursus, korte kurser, sommerkurser';
$this->document->setTitle($title);
$this->document->meta = $meta;
$this->document->rss = array('title' => 'Nyheder',
'link' => '/rss/nyheder.php');
$this->document->body_class = 'sidepicture';
if (date('m-d') > '12-01' AND date('m-d') < '12-24') {
$this->document->body_class .= ' christmas';
}
$this->document->theme = 'frontpage';
$packages = array('politi', 'fitness', 'outdoor', 'boldspil');
$tpl = $this->template->create('frontpage');
$data = array(
'content' => $tpl->render($this, array('packages' => $packages)),
'content_sub' => $this->getSubContent());
$tpl = $this->template->create('sidebar-wrapper');
return $tpl->render($this, $data);
}
function getSubContent()
{
$tpl = $this->template->create('News/sidebar-featured');
$data = array('nyheder' => $tpl->render($this, array('nyheder' => VIH_News::getList('', 1, 'H�j'))),
'kurser' => VIH_Model_LangtKursus::getNext());
$tpl = $this->template->create('frontpage-sidebar');
return $tpl->render($this, $data);
}
}