#1: Added the summary field to all nodes. It gets saved if we edit the node. On a node page the summary is shown first, then the main content. In the blog list the title and the summry is shown

This commit is contained in:
Dario Bösch
2015-05-21 10:18:03 +02:00
parent 202253e414
commit 0e0cd131a5
3 changed files with 56 additions and 7 deletions

View File

@@ -46,8 +46,20 @@ feature -- HTTP Methods
if n.content_type.is_equal ("blog") then
lnk := node_api.node_link (n)
s.append ("<li class=%"cms_type_"+ n.content_type +"%">")
-- Title with link
s.append (l_page.link (lnk.title, lnk.location, Void))
--s.append (l_page.link (n.title + " (#" + n.id.out + ")", node_api.node_path (n), Void))
-- Summary
if attached n.summary as l_summary then
s.append ("<br />")
if attached api.format (n.format) as f then
s.append (f.formatted_output (l_summary))
else
s.append (l_page.formats.default_format.formatted_output (l_summary))
end
end
s.append ("</li>%N")
end
end