public function getExcerpt() { return Awecms::summarize($this->content); }
<?php foreach ($results as $result) { ?> <a href="<?php echo Yii::app()->createUrl($result->link); ?> " title="<?php echo CHtml::encode($result->title); ?> "> <?php echo $query->highlightMatches(CHtml::encode($result->title)); ?> </a> <br/> <?php echo $query->highlightMatches(Awecms::summarize($result->content)); ?> <br/> <hr/> <?php } ?> <?php } else { ?> <p class="error">No results matched your search terms.</p> <?php }