Blog Home Code Sample

Here is some example code and CSS to build a home page for the blog. This is just an example and you have the flexibility to lay out the page to suit your own design.

Below is a screenshot of the layout that this code will build.  

HTML:

Below is the HTML / Branch code that would go in the Template field for the Blog Home content template. 

<h1>News & Events</h1>
{loop items="#posts" value="post"}
  <div class="newsFeature">
    <h2 class="newsTitle">
      <a href="{#post.url}">{#post.postTitle}</a>
    </h2>
    {#post.publishedOnDate}
    {if #post.abstract}
      {#post.abstract}
    {else}
      {#post.content|truncate length="500"}
    {/if}
    <a href="{#post.url}">read more…</a>
  </div>
{/loop}
<p>
  <a href="/news/archive">More press releases</a><br />
  <a href="/news/feed/rss">RSS</a>
  <a href="/news/feed/rss">Subscribe to our RSS news feed</a>
</p>