Daan is sweet to Kelley and delegates himself TestCMS code reflection
[ssproject1617.git] / testcms-final-anon / system / functions / pages.php
1 <?php defined('IN_CMS') or die('No direct access allowed.');
2
3 /**
4 Theme functions for pages
5 */
6 function page_id() {
7 if($itm = IoC::resolve('page')) {
8 return $itm->id;
9 }
10
11 return '';
12 }
13
14 function page_url() {
15 if($itm = IoC::resolve('page')) {
16 return $itm->url;
17 }
18
19 return '';
20 }
21
22 function page_name() {
23 if($itm = IoC::resolve('page')) {
24 return $itm->name;
25 }
26
27 return '';
28 }
29
30 function page_title($default = '') {
31 if($itm = IoC::resolve('page')) {
32 return $itm->title;
33 }
34 if($itm = IoC::resolve('article')) {
35 return $itm->title;
36 }
37
38 return $default;
39 }
40
41 function page_content() {
42 if($itm = IoC::resolve('page')) {
43 return $itm->content;
44 }
45
46 return '';
47 }
48
49
50 function page_active() {
51 if($itm = IoC::resolve('page')) {
52 return $itm->active;
53 }
54
55 return '';
56 }
57
58 function page_status() {
59 if($itm = IoC::resolve('page')) {
60 return $itm->status;
61 }
62
63 return '';
64 }