diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-05-05 18:09:22 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-05-05 18:09:22 +0200 |
| commit | 7ef6bd96b678c5cb70f31c7400019530dcbe7cbd (patch) | |
| tree | e191cfa613313fafb5c1adefb2801d480e1fe4b0 /protected/modules/cms/models | |
| parent | 10b3e68c049cc0830584e535b9273ec1c7745450 (diff) | |
Assets etc aus git genommen, erste ansicht vereinslist
Diffstat (limited to 'protected/modules/cms/models')
| -rw-r--r-- | protected/modules/cms/models/Cms.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/protected/modules/cms/models/Cms.php b/protected/modules/cms/models/Cms.php index 885e589..ca64bad 100644 --- a/protected/modules/cms/models/Cms.php +++ b/protected/modules/cms/models/Cms.php @@ -35,8 +35,12 @@ class Cms { $column .' = :id', array( ':id' => $id)); - if(!$sitecontent && Cms::module()->strict404raising) + if(!$sitecontent && Yii::app()->getModule('cms')->strict404raising) throw new CHttpException(404); + else if (!$sitecontent) { + $sitecontent = new Sitecontent(); + $sitecontent->content = ""; + } else if($return) return $sitecontent->content; else @@ -57,12 +61,12 @@ class Cms { } } public static function getMenuPoints($id) { - + $tmp=array(); if(is_numeric($id)) $sitecontent = Sitecontent::model()->findByAttributes(array('id'=> $id)); $childs = $sitecontent->childs; if($childs) { - $tmp=array(); + foreach($sitecontent->childs as $child) { Yii::trace("Lala","Debug"); $tmp = array_merge($tmp,array(array('label'=>$child->title, 'url'=>array('/cms/sitecontent/view', 'page'=>$child->title_url)))); |
