<!-- start single sidebar --> <div class="single_sidebar"> <h2>Popular <?php echo $categoryType; ?> s <span class="fa fa-angle-double-right"></span></h2> <ul class="news_tab"> <?php $post = new SKS\CONTROLLER\Post(); $this->postList = $post->recent_posts($categoryType); foreach ($this->postList as $post) { echo ' <li> <div class="media"> <div class="media-left"> <a href="' . LINK_VIEW_POST . $post->getId() . '" class="news_img" style="background:#fff url(\'' . URL . $post->getBannerImage()->getThumbSmall() . '\') no-repeat scroll 100% 100%"> </a> </div> <div class="media-body"> <a href="' . LINK_VIEW_POST . $post->getId() . '" class="pb">' . $post->getTitle() . '</a> <span class="feed_date">' . $post->getPostedAt()->format('Y-m-d') . '</span> </div> </div> </li> '; } ?> </ul> </div>
<?php $post = new SKS\CONTROLLER\Post(); $this->postList = $post->recent_posts($categoryType); foreach ($this->postList as $post) { echo ' <li> <div class="media"> <div class="media-left"> <a href="#" class="news_img"> <img alt="img" src="' . URL . $post->getBannerImage()->getThumbSmall() . '" class="media-object"> </a> </div> <div class="media-body"> <a href="' . LINK_VIEW_POST . $post->getId() . '" class="pb">' . $post->getTitle() . '</a> <span class="feed_date">' . $post->getPostedAt()->format('Y-m-d') . '</span> </div> </div> </li> '; } ?>