== Hobix Tip from Leon: Author About Pages ==

Leon's got his Hobix blog up and a post explaining his personal hacks: <http://blog.xeraph.org/general/2005/07/24/sorry-about-the-duplicates>

Let's hang on to that code for adding author about pages to your blog.

== Hacking the Template ==

This goes in your entry.html.quick template:

|  entry_footer: |
   <% if !(entry.respond_to?(:comments) && (entry.comments.nil? || entry.comments 
== false)) %>
   <% entry_id = entry.id %>
   posted by <a href="/about/<%= entry.author %>.html">
   <%= weblog.authors[entry.author]['name'] %></a>
   at <%= entry.created.strftime("%H:%M %p") %>
   <% comments = weblog.storage.load_attached( entry_id, "comments" ) rescue [] 
%>
   | <%= comments.length %> comments
   <% end %>|

Now at least you've got a link to the author's page. The about pages can be adding by posting them, just as you would post a blog entry.

 hobix post blahhg about/leon

And, if you want the `about' posts ignored in the flow of front page blog posts, use an `ignore' section in the hobix.yaml:

 sections:
   about: {ignore: true}

_why
_______________________________________________
Hobix-is-the-way mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/hobix-is-the-way

Reply via email to