Blog

getModels(); foreach($models as $m){ if($m->excerpt != ''){ $excerpt = '

' . $m->excerpt . '

'; }else{ $excerpt = Truncate( $m->body, 200 ); } $link = ['blogposts/view', 'id' => $m->id, 'slug' => $m->slug, 'year' => date('Y',strtotime($m->date)), 'month' => date('m',strtotime($m->date)), 'day' => date('d',strtotime($m->date))]; echo '
'; //$mRender .= $this->renderThumbnail($m); echo '

' . Html::a(Html::encode($m->title), $link) . '

'; echo '
    '; echo '
  • '.date('M d, Y',strtotime($m->date)).'
  • '; // echo '
  • '.count($m->blogComments).' Comments
  • '; echo '
'; echo $excerpt; echo '
'; echo Html::a('Read Article',$link,['class'=>'button tiny right']); echo '

'; } ?>

Categories