Post Archive Code Sample
Here is some example code and CSS to build a product detail page for the store. 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 Post Archive content template.
<h1>{#startDateTimestamp|date format="Y"} News Items</h1>
{if #postsByMonth exist}
{loop items="#postsByMonth" value="month"}
<h2>{#month.month}</h2>
{if #month.postCount > 0}
<ul>
{loop items="#month.posts" value="post"}
<li><a href="{#post.url}">{#post.postTitle}</a></li>
{/loop}
</ul>
{/if}
{/loop}
{else}
There is currently no news.
{/if}
{if #archiveYears}
{loop items="#archiveYears" value="year"}
{if #year.isCurrent}
<strong>{#year.year}</strong><br/>
{else}
<a href="{#year.url}">{#year.year}</a><br/>
{/if}
{/loop}
{/if}
<a href="/news-events/news/feed/rss">RSS</a>
<a href="/news-events/news/feed/rss">Subscribe to our RSS news feed</a></p>