From b7b0c99c2173a8a19895a65da88ce5e7b0516131 Mon Sep 17 00:00:00 2001
From: David Craig
Date: Thu, 14 May 2015 12:11:09 +1200
Subject: [PATCH] Fix excerpt parsing
---
code/model/BlogPost.php | 2 +-
templates/Includes/PostSummary.ss | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/code/model/BlogPost.php b/code/model/BlogPost.php
index 05ed547..bcf39b2 100644
--- a/code/model/BlogPost.php
+++ b/code/model/BlogPost.php
@@ -496,7 +496,7 @@ class BlogPost extends Page {
*/
$content = $this->dbObject('Content');
- return $content->LimitWordCount($wordsToDisplay);
+ return $content->Summary($wordsToDisplay);
}
/**
diff --git a/templates/Includes/PostSummary.ss b/templates/Includes/PostSummary.ss
index 38af838..f2ef8b9 100644
--- a/templates/Includes/PostSummary.ss
+++ b/templates/Includes/PostSummary.ss
@@ -13,8 +13,7 @@
<% if $Summary %>
- $Summary
-
+
$Summary
<% else %>
$Excerpt
<% end_if %>