예제 #1
0
 public static function get_category_list($category)
 {
     $array = ContentCategory::model()->findAll(array('condition' => 'published=1 AND parent_id=' . (int) $category, 'order' => 'title ASC', 'limit' => '10'));
     echo '<ul class="list-group list-group-bordered list-group-noicon uppercase">';
     foreach ($array as $key => $value) {
         echo '<li class="list-group-item">' . CHtml::link('<span class="size-11 text-muted pull-right">(' . ContentCategory::count_category($category) . ')</span> ' . $value['title'], array('content/category', 'id' => $value['id']), array()) . ' <small></small></li>';
     }
     echo '</ul>';
 }