DEMO Custom Blog 2
Posts filtered by Category: Group 1/G1 Sub Cat I clear filter
Sample2 Post Three
5 November 2019
Cras elementum viverra nisl, at convallis urna tristique eu. Nam ut erat libero. In posuere turpis congue nunc rhoncus laoreet. In volutpat mauris vitae augue bibendum pharetra. Nullam pharetra, ligula ac ultricies porta, erat justo rhoncus nisl, sit amet tempus diam leo vitae turpis. Nam id lorem fringilla, finibus nulla...
Sample2 Post Two
4 November 2019
Cras elementum viverra nisl, at convallis urna tristique eu. Nam ut erat libero. In posuere turpis congue nunc rhoncus laoreet. In volutpat mauris vitae augue bibendum pharetra. Nullam pharetra, ligula ac ultricies porta, erat justo rhoncus nisl, sit amet tempus diam leo vitae turpis. Nam id lorem fringilla, finibus nulla...
This is a description for my blog.
It has Categories and Tags enabled and can be filtered by Keyword/Search, Category, Tag and Month.
For the depreciated blog layout see here.
Search
All Categories
All Tags
By Month
Code: (General Blog Layout)
{% if request.request_url.params.prop_ItemTags %}
{% assign filterType = 'Tag' %}
{% assign filterItem = request.request_url.params.prop_ItemTags | url_decode %}
{% elsif request.request_url.params.prop_ItemCategories %}
{% assign filterType = 'Category' %}
{% assign filterItem = request.request_url.params.prop_ItemCategories | url_decode %}
{% elsif request.request_url.params.prop_ReleaseDate_Max %}
{% assign filterType = 'Month' %}
{% assign filterItem = request.request_url.params.prop_ReleaseDate_Max | date: "%B" %}
{% elsif request.request_url.params.prop_KeyWords %}
{% assign filterType = 'Search' %}
{% assign filterItem = request.request_url.params.prop_KeyWords | strip_html %}
{% else %}
{% assign filterType = '' %}
{% assign filterItem = '' %}
{% endif %}
<div>
<hr>
<div class="grid-x grid-padding-x">
<div class="cell medium-8">
<h2>{{this['Name']}}</h2>
{% if filterType != null %}
<h6><i>Posts filtered by {{filterType}}: <b>{{filterItem}}</b></i> <a href="{{this.url}}">clear filter</a></h6>
{% endif %}
{% component type:"module", source: "Blog Post", layout:"Custom List 2", filterBy: "parentId", filterValue: "{{this.Id}}", isSearchResult: "true", sortBy: "releaseDate", sortOrder: "DESC", limit: "10", displayPagination: "true" %}
</div>
<div class="cell medium-4">
{{this['Description']}}
<hr>
<h5>Search</h5>
<form>
<input type="hidden" name="prop_ModuleId" value="1534" >
<input type="hidden" name="prop_ParentId" value="{{this.id}}" >
<input type="text" name="prop_KeyWords" maxlength="255" value="{{request.request_url.params.prop_KeyWords | strip_html}}" >
<input type="submit" value="Search" >
</form>
<hr>
<h5>All Categories</h5>
{% component type:"module_category_list", module:"Blog Post", parentItemId:"{{this.id}}" %}
<hr>
<h5>All Tags</h5>
{% component type:"module_tag_list", module:"Blog Post", parentItemId:"{{this.id}}" %}
<hr>
<h5>By Month</h5>
{% component type:"module_archive", module:"Blog Post", parentItemId:"{{this.id}}" %}
</div>
</div>
<hr>
</div>
Code: (Post List Layout)
<div class="media-object">
<div class="media-object-section">
<div class="thumbnail">
<a href="{{this['Url']}}"><img src="{{this['Image']}}?height=200&width=200&mode=crop" alt="{{this['Name']}}"></a>
</div>
</div>
<div class="media-object-section main-section">
<h2><a href="{{this['Url']}}">{{this['Name']}}</a></h2>
<p><small>{{this.releasedate | date: "%e %B %Y"}}</small></p>
<p>{{this['Description'] | strip_html | truncatewords: 50}}</p>
</div>
</div>