diff --git a/neopolimatrix/page/autoload.inc b/neopolimatrix/page/autoload.inc index db974aa..3dfeee4 100644 --- a/neopolimatrix/page/autoload.inc +++ b/neopolimatrix/page/autoload.inc @@ -1,4 +1,5 @@ filter = $filter; + } + + private function switch_filter($filter){ + switch($filter){ + case 1: + return '%'; + case 2: + return '"%Überwachung%"'; + default: + return 'filter fail';} + + } + + public function generate_list(){ + $result = ''; + $tag = $this->filter; + $elements = elements::getAllElementsOfTag($this->switch_filter($tag)); + foreach($elements as $element){ + $element['title'] = $element['id']; + $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/element.tpl'), $element); + } + return $result; + } + + public function html(){ + $vars = array(); + $vars['content'] = $this->generate_list(); + new SYSTEM\LOG\INFO(print_r($vars['content']), TRUE); + return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/default_list.tpl'), $vars); + } +} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/neopolimatrix/page/default_list/default_list.tpl b/neopolimatrix/page/default_list/default_list.tpl new file mode 100644 index 0000000..934b349 --- /dev/null +++ b/neopolimatrix/page/default_list/default_list.tpl @@ -0,0 +1,2 @@ +${content} +test \ No newline at end of file diff --git a/neopolimatrix/page/default_list/element.tpl b/neopolimatrix/page/default_list/element.tpl new file mode 100644 index 0000000..b95fb14 --- /dev/null +++ b/neopolimatrix/page/default_list/element.tpl @@ -0,0 +1,10 @@ +
+

Author: ${author}

+

Veröffentlicht: ${timestamp}

+
+
+

${title}

+
+${deDE} +
+
\ No newline at end of file diff --git a/neopolimatrix/page/default_page/default_page.php b/neopolimatrix/page/default_page/default_page.php index 808da93..b6d4cf9 100644 --- a/neopolimatrix/page/default_page/default_page.php +++ b/neopolimatrix/page/default_page/default_page.php @@ -6,8 +6,9 @@ class default_page extends \SYSTEM\PAGE\Page { ''. ''. ''. - ''. - ''; + ''. + ''; + } private function css(){ diff --git a/neopolimatrix/page/default_page/default_page.tpl b/neopolimatrix/page/default_page/default_page.tpl index 8b1d4e8..32a320e 100644 --- a/neopolimatrix/page/default_page/default_page.tpl +++ b/neopolimatrix/page/default_page/default_page.tpl @@ -9,15 +9,15 @@

Neo-PoliMatrix

-
+
Blog   Impressum
-