Updates, eindpunten aangepast voor Jorit/Websight
This commit is contained in:
@@ -102,7 +102,7 @@ class NewsItem extends Model {
|
||||
}
|
||||
|
||||
public function excerpt() {
|
||||
$hasImages = count($this->images) > 0;
|
||||
$hasImages = isset($this->images) && count($this->images) > 0;
|
||||
$maxLength = $hasImages ? 200 : 500;
|
||||
return '<p class="news-excerpt ' . ($hasImages ? 'short' : 'long') . '">' .
|
||||
substr($this->content, 0, $maxLength) .
|
||||
|
||||
Reference in New Issue
Block a user