Exemplo n.º 1
0
Arquivo: Post.php Projeto: sks40gb/sks
 public function getCategories($postType)
 {
     $category = new \SKS\DB\Entity\PostCategory();
     $categories = $category->find(array("type" => $postType));
     $this->view->categories = $categories;
     $this->view->render('post/get_categories_by_id', false);
 }
Exemplo n.º 2
0
<?php

$postCategory = new \SKS\DB\Entity\PostCategory();
$this->categories = $postCategory->findAll();
?>
<div class="well">
    <h4>Blog Categories</h4>
    <div class="row">
        <div class="col-lg-12">
            <ul class="list-unstyled">
                <?php 
foreach ($this->categories as $category) {
    $link = URL . "post/category?category_id=" . $category->id;
    echo "<li><a href='{$link}'>{$category->name}</a>";
}
?>
            </ul>
        </div>                  
    </div>
    <!-- /.row -->
</div>