Provides the ability to access and render Forums and Forum Threads.  Note that the ability to use liquid to render forum data extends to posts, but in order to create a new post of thread, you must use an ASP.NET web forms Page Template with said functionality built in (such as the default Forum Thread and Forum Post Page Templates).

The forums object allows you to select a Forum or Forum Threads :

<div class="content-panel panel panel-default">
<div class="panel-heading">
<h4>
<span class="fa fa-comments" aria-hidden="true"></span>
{{ snippets["Home Forum Activity Heading"] | default: "Forum Activity" | h }}
</h4>
</div>
{% for forum in website.forums %}
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-sm-6">
<h4 class="list-group-item-heading"><a href="{{ forum.url | h }}"> {{ forum.name | h }}</a></h4>
<div class="list-group-item-text content-metadata">{{ forum.adx_description | h }}</div>
</div>
<div class="col-sm-3 content-metadata">{{ forum.thread_count }} threads</div>
<div class="col-sm-3 content-metadata">{{ forum.post_count }} posts</div>
</div>
</li>
</ul>
{% endfor %}
</div>

forums Object

The forums object allows you to access any specific forum in the portal, or to access all forum threads in the portal (regardless of the forum).

Attributes

threads

Returns a forumthreads object containing all forumthread objects in the portal.

all

Returns all forum objects in the portal. Note that website.forums Is also an equivalent.

thread_count

Returns the interger value of the count of how many threads there are in the entire website.

post_count

Returns the interger value of the count of how many posts there are total in the portal.

[forum name or id]

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

{% assign forum = forums["Forum Name"] %}

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

forum Object

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

Attributes

threads

Returns a forumthreads object containing all forum threads for the forum.

name

The Name of the Forum.

thread_count

Returns the interger value of the count of how many threads there are in the forum.

post_count

Returns the interger value of the count of how many posts there are in the entire forum.

forumthreads Object

The forumthreads object allows you to access a collection of forumthread objects.  You can order the forum threads and achieve pagination as well using liquid filters.

{% assign threads = forum.threads | order_by “adx_name”, “desc” | paginate: 0,4 | all %}

Attributes

all

Returns all forumthread objects in the collection.

A Single Forum Thread

Attributes

posts

Returns a forumposts object containing all forum posts for the thread.

author

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

latest_post

Returns the latest post in the thread.

first_post

Returns the first post in the thread.

post_count

Returns the interger value of the count of how many posts there are in the thread.

is_answered

Is the thread answered or not?

is_sticky

Is the thread a sticky thread?

forumposts Object

The forumposts object allows you to access a collection of forumpost objects.

Attributes

all

Returns all forumthread objects in the collection.

A Single Forum Post

Attributes

author

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

content

The content of the post.

is_answer

Is this post an asnwer to the thread?