public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Added article.excerpt liquid tag

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1808 
567b1171-46fb-0310-a4c9-b4bef9110e78
Caged (author)
Sat Aug 19 01:11:21 -0700 2006
commit  3309c47f842f21184bcde122c62e06f63ab73b0f
tree    4490e5afcb1424eaefad30bd6595fd9f7a4df0c8
parent  fe87cbf104517386b16661ea9a2c5374caaabde8
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 * SVN *
0
 
0
+* [NEW] Added {{ article.excerpt }} liquid tag for accessing an articles excerpt.
0
+
0
 * Change - Article#body_for_mode only returns the body, not excerpt + body. This means you'll have to do this in your templates
0
 if you want to show both:
0
 
...
88
89
90
91
92
 
93
94
95
...
98
99
100
 
101
102
103
104
105
106
107
108
...
88
89
90
 
91
92
93
94
95
...
98
99
100
101
102
103
104
105
 
106
107
108
0
@@ -88,8 +88,8 @@ ActiveRecord::Schema.define(:version => 46) do
0
     t.column "author_email", :string
0
     t.column "author_ip", :string, :limit => 100
0
     t.column "comments_count", :integer, :default => 0
0
- t.column "version", :integer
0
     t.column "updater_id", :integer
0
+ t.column "version", :integer
0
     t.column "site_id", :integer
0
     t.column "approved", :boolean, :default => false
0
     t.column "comment_age", :integer, :default => 0
0
@@ -98,11 +98,11 @@ ActiveRecord::Schema.define(:version => 46) do
0
 
0
   create_table "events", :force => true do |t|
0
     t.column "mode", :string
0
+ t.column "user_id", :integer
0
     t.column "article_id", :integer
0
     t.column "title", :text
0
     t.column "body", :text
0
     t.column "created_at", :datetime
0
- t.column "user_id", :integer
0
     t.column "author", :string, :limit => 100
0
     t.column "comment_id", :integer
0
     t.column "site_id", :integer
...
13
14
15
 
16
17
18
...
13
14
15
16
17
18
19
0
@@ -13,6 +13,7 @@ module Mephisto
0
           'permalink' => @source.permalink,
0
           'url' => @source.full_permalink,
0
           'body' => @source.send(:body_for_mode, options[:mode] || :list),
0
+ 'excerpt' => @source.excerpt_html,
0
           'published_at' => @source.site.timezone.utc_to_local(@source.published_at),
0
           'updated_at' => @source.site.timezone.utc_to_local(@source.updated_at),
0
           'comments_count' => @source.comments_count,
...
82
83
84
 
85
86
87
...
82
83
84
85
86
87
88
0
@@ -82,6 +82,7 @@ module Mephisto
0
         # XXX cache this someday
0
         earliest = controller.site.articles.find(:first, :order => 'published_at').published_at.beginning_of_month
0
       end
0
+
0
       
0
       private
0
         # marks a page as class=selected
...
4
5
6
 
7
8
9
...
4
5
6
7
8
9
10
0
@@ -4,6 +4,7 @@
0
   {% if forloop.index < 3 %}
0
       <div class="story{% if forloop.first %} first{% endif %}">
0
         <h3>{{ article | link_to_article }}</h3>
0
+ {{ article.excerpt }}
0
         {{ article.body }}
0
         <div class="details">
0
           Posted on {{ article.published_at | format_date: 'stub', true }} |
...
2
3
4
 
5
6
7
...
2
3
4
5
6
7
8
0
@@ -2,6 +2,7 @@
0
   <div class="inside">
0
     <div class="primary">
0
       <h1>{{ article.title }}</h1>
0
+ {{ article.excerpt }}
0
       {{ article.body }}
0
     </div>
0
     <hr class="hide" />

Comments

    No one has commented yet.