PATH:
home
/
letacommog
/
letaweb
/
admin
/
modules
/
newscategory
<?php class CWidgetNewscategory extends CWidgetCMS { public $text,$display_image, $show_more; public $display_datetime, $display_summary,$page,$no_product_label,$margin,$expand,$dataProvider; public $calc_height, $column; public $layout_type, $thumbnail; public $thumb_width, $thumb_height; public $filter, $logic, $max, $start_index, $order_sql, $total; public $number_per_page,$order, $current_page,$offset,$where; public $list_data = array(); public function init() { parent::init(); } public function decodeData() { $data = $this->module_data; $this->page = $this->news_page; } protected function registerHeaderScripts() { } public function getChildProductCategories($id) { $categories = BNews_Categories::model()->findAll('parent_id=:parent_id', array(':parent_id' => $id)); return $categories; } public function renderNewsCategories() { return $this->renderProductCategoriesItem(0, $this->page); } public function renderProductCategoriesItem($id) { $s = '<ul>'; $categories = $this->getChildProductCategories($id); if (sizeof($categories) > 0) { foreach ($categories as $item) { $s = $s.'<li>'; $s = $s.'<a href="'.Yii::app()->url->createPageURL($this->page, array('category' => $item['id'])).'">'.$item['name'].'</a>'; $s = $s.$this->renderProductCategoriesItem($item['id'], $this->news_page); $s = $s.'</li>'; } } $s = $s.'</ul>'; return $s; } }
[+]
..
[-] frontend_class.php
[edit]
[-] frontend_view.php
[edit]
[-] backend.php
[edit]
[-] backend.js
[edit]