PATH:
home
/
letacommog
/
letaweb
/
admin
/
widgets
/
modules
<?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) { if($id == 0) $categories = BNews_Categories::model()->findAll(array('order' => 'sort_order asc', 'condition' => '(parent_id=:parent_id or parent_id IS NULL)', 'params' => array(':parent_id' => $id))); else $categories = BNews_Categories::model()->findAll(array('order' => 'sort_order asc', 'condition' => 'parent_id=:parent_id', 'params' => 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['inline_id'])).'">'.$item['name'].'</a>'; $s = $s.$this->renderProductCategoriesItem($item['inline_id'], $this->news_page); $s = $s.'</li>'; } } $s = $s.'</ul>'; return $s; } }
[+]
..
[-] CWidgetYoutube.php
[edit]
[-] CWidgetInfobanner.php
[edit]
[-] CWidgetTextimage.php
[edit]
[-] CWidgetShare_buttons.php
[edit]
[-] CWidgetIframe.php
[edit]
[-] CWidgetNewslist.php
[edit]
[-] CWidgetNewsdetail.php
[edit]
[+]
slick
[-] CWidgetNavbar.php
[edit]
[-] CWidgetAlert.php
[edit]
[-] CWidgetFacebookvideo.php
[edit]
[-] CWidgetSlick.php
[edit]
[-] CWidgetTitle.php
[edit]
[-] CWidgetGallery.php
[edit]
[-] CWidgetSocial_buttons.php
[edit]
[-] CWidgetFacebookpage.php
[edit]
[+]
accordion
[-] CWidgetContactform.php
[edit]
[-] CWidgetButton.php
[edit]
[-] CWidgetProgress_bar.php
[edit]
[-] CWidgettestmodule.php
[edit]
[-] CWidgetStatcounter.php
[edit]
[-] CWidgetEmbed.php
[edit]
[-] CWidgetFacebooksend.php
[edit]
[-] CWidgetRecentnews.php
[edit]
[-] CWidgetIcon.php
[edit]
[-] CWidgetNewscomment.php
[edit]
[-] CWidgetFacebookcomment.php
[edit]
[-] CWidgetIhover.php
[edit]
[-] CWidgetMenu.php
[edit]
[+]
tab
[-] CWidgetSpacer.php
[edit]
[-] CWidgetBox.php
[edit]
[-] CWidgetHtml.php
[edit]
[-] CWidgetImage.php
[edit]
[-] CWidgetAudio_player.php
[edit]
[-] CWidgetCountdown.php
[edit]
[-] CWidgetTypedtext.php
[edit]
[-] CWidgetCarousel.php
[edit]
[-] CWidgetText.php
[edit]
[-] CWidgetVideo.php
[edit]
[-] CWidgetFacebookpost.php
[edit]
[-] CWidgetRssfeed.php
[edit]
[-] CWidgetInfobox.php
[edit]
[-] CWidgetInfotable.php
[edit]
[-] CWidgetFancytext.php
[edit]
[-] CWidgetGooglemap.php
[edit]
[-] CWidgetSlideshow.php
[edit]
[-] CWidgetPricetable.php
[edit]
[-] CWidgetNewscategory.php
[edit]
[-] CWidgetLine.php
[edit]
[-] CWidgetModal.php
[edit]
[-] CWidgetMailchimp.php
[edit]
[-] CWidgetFacebooklike.php
[edit]