Blog Post

Author: Webvanta

This page shows an individual blog post; it is the "permalink" page for the post.

The two sections of code display the post itself, and then the comment form and the list of comments.

<w:kb:item>
<p><a href='/bp/blog' class="lnk-s1">Blog</a></p>
<div class='blog_article clearfix'>
  <h1><span><w:name /></span></h1>
  <!-- reference for date formats:  http://www.webvanta.com/article/23155-formatting-dates/9363-displaying-database-items  -->
  <p class='byline'>Posted <w:published_at format='%B %e,  %Y  %I:%M %p' />
    <!-- display  the author field unless it is blank -->
    <w:unless condition='author.blank?'>by <w:author /> </w:unless>    
    <w:if_comments><a href='#comments'><w:comment_count /> comments</a> </w:if_comments>
  </p>
  <!--
    is the icon  field blank? if not display the small rendition of the icon.
    renditions are  defined in 'design > config settings' under 'images >  image.thumbnail.settings'
  -->
  <w:unless condition='icon.blank?'><img src='<w:icon rendition="small" />' class='article-icon' alt='' /></w:unless>
  <w:body />
  <w:snippet name='post_categories_list'  />
</div>
<div class='noprint'>
  <a name='comments'> </a>
  <w:snippet name='kb_item_comment_form'  />
</div>
<div id='comments'>
  <a name='comments' ></a>
  <w:if_comments>
    <div class="comment-title">
      <h2><a name='comments'>Reader  Comments</a></h2>
      <a href='#comments' class="lnk-s1"><w:comment_count /> comments</a>
    </div>
    <w:comments:each>
      <div class="comment-box">
        <h3><w:subject /></h3>
        <p class='byline'>From: <w:name />, <w:created_at  format = '%m/%d/%y  %I:%M  %p' /></p>
         <p><w:body /></p>
      </div>
    </w:comments:each>
  </w:if_comments>
</div>
</w:kb:item>