Permalink
Browse files

Able to generate list of authors

- Implements <cms:authors> and children.
- Still need to implement a page that displays posts by a given author.
  • Loading branch information...
1 parent 43947b9 commit 2305d3cde7dfe5122c06236f4b0beb0389d7b6f7 Eric Durante and Scott Woods committed with woods Mar 12, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 vendor/modules/blog/app/controllers/blog/page_feature.rb
@@ -244,6 +244,23 @@ def blog_categories_feature(data)
tag.locals.archive[:cnt]
end
+
+ c.loop_tag('author') do |tag|
+ Blog::BlogPost.find(:all,
+ :include => ['active_revision'],
+ :conditions => {'blog_posts.status' => 'published',
+ 'blog_post_revisions.status' => 'active',
+ :blog_blog_id => data[:blog_id]},
+ :order => 'blog_post_revisions.author',
+ :group => 'blog_post_revisions.author')
+ end
+
+ c.link_tag('author:author') do |tag|
+ SiteNode.link(data[:list_page], 'author', CGI::escape(tag.locals.author.author))
+ end
+
+ c.value_tag('author:name') { |tag| tag.locals.author.author }
+
c.link_tag('list_page') { |tag| data[:list_page] }
end
end

0 comments on commit 2305d3c

Please sign in to comment.