Provides the ability to access and render Blogs and Blog Posts.

The blogs object allows you to select a specific blog or blog posts:

{% assign posts = blogs.posts | paginate: 0,4 %}
<div class="content-panel panel panel-default">
<div class="panel-heading">
{% assign sitemarker = sitemarkers["Blog Home"] %}
{% assign snippet = snippets["Home Blog Activity Heading"] %}
<a class="pull-right" href="{{sitemarker.url}}"> All Blogs </a>
<h4>
<a class="feed-icon fa fa-rss-square" href="{{ blogs.feedpath }}" />
{{ snippet.adx_value }}
</h4>
</div>
<ul class="list-group">
{% for post in posts.all %}
<li class="list-group-item" >
<a class="user-avatar" href="{{ post.author_url }}">
<img src="{{ post.user_image_url }}" />
</a>
<h4 class="list-group-item-heading">
<a href="{{ post.app_relative_path }}">{{ post.title }}</a>
</h4>
<div class="content-metadata">
<abbr class="timeago">{{ post.publish_date }}</abbr>
&ndash;
<a href="{{ post.author_url }}"> {{ post.author_name }} </a>
&ndash;
<a href="{{ post.application_path }}#comments">
<span class="fa fa-comment" aria-hidden="true"></span> {{ post.comment_count }}
</a>
</div>
</li>
{% endfor %}
</ul>
</div>

blogs Object

The blogs object allows you to access any specific blog in the portal, or to access all blog posts in the portal (regardless of the blog).

Attributes

posts

Returns a blogposts object containing all blog posts in the portal.

[blog name or id]

You can access any blog by its Name or Id properties.

{% assign blog = blogs["Blog Name"] %}

{% assign blog = blogs["da8b8a92-2ee6-476f-8a21-782b047ff460"] %}

blog Object

The blog object allows you to work with a single blog, allowing you to access the posts for that blog.

Attributes

posts

Returns a blogposts object containing all blog posts for the blog.

name

The Name of the Blog.

title

The Title of the Blog.

url

The URL of the Blog.

blogposts Object

The blogposts object allows you to access a collection of blog post objects.  You can order the blog posts and achieve pagination as well using liquid filters

{% assign blogposts = blogs.posts | order_by “adx_name”, “desc” | paginate: 0,4 | all %}
Note that blogs.posts.all is also a valid way to get all blog posts
blogs.posts | from_index: 0 | take: 2 
is also possible

Attributes

all

Returns all blogpost objects in the collection.

A Single Blog Post

Attributes

url

The URL of the post.

content

Returns the Content field for the post.

author

Returns the author for the post (which is simply a contact entity object).

title

The Title of the Post.

comment_count

returns the interger value of the count of how many comments there are for a given post.

publish_date

The date at which the post is/was published.