solved How do I get Site Builder to display Forum topics, not forum posts?

alt=
LesRinchen
@lesrinchen
8 years ago
109 posts
On my main page, I want to show a list of the 5 latest Forum topics added or replied to (The Forum lives on a Community profile.)

When I create an Item List widget for the Forum module, I get links to pages that don't exist, that refer to profiles of members who posted, rather than to the Forum thread itself.
For example, I'll click on what looks like a Forum topic on the list and it will direct to this URL: http://mysite.jamroomhosting.com/profilename/forum/700/forum-topic (not a real url, just an example of the format).
The correct link would be http://mysite.jamroomhosting.com/community/forum/uncategorized/700/forum-topic.

And should I order the list by _created or _updated to show the most recently active topics, whether started or commented upon?

(It works perfectly on the default NingJa main page template, but I'm creating a new main page layout with Site Builder and can't replicate the function.)

updated by @lesrinchen: 12/22/16 11:55:59AM
michael
@michael
8 years ago
7,750 posts
Each Forum has a 'forum_group_id' that is common to all the posts in that forum. You can use the "Group By " List option for the Item LIst widget that you create to group by that.

So:
* Add a widget that is an "Item List" widget type
* LIST MODUE: Forum
* GROUP BY: forum_group_id

That should get you what your after. If you wanted to do it in with a "Template Code" widget, that would work too, the code for that would be:
{jrCore_list module="jrForum" limit="5" group_by="forum_group_id"}

If you want to, add the "Order By" _updated to get the newest ones to the top.
alt=
LesRinchen
@lesrinchen
8 years ago
109 posts
Still not working. I did as you instructed, grouped by forum_group_id. I have only one Forum, the one that lives on the Community profile and to which all users can post. The list shows the titles of Forum topics, but the URLs in the hyperlinks don't go to the Forum threads. Rather, they go to non-existent pages with the posting profile's id as noted above:
http://mysite.jamroomhosting.com/profilename/forum/700/forum-topic
instead of
http://mysite.jamroomhosting.com/community/forum/uncategorized/700/forum-topic.

And it's still not retrieving the most recently updated threads either, though I've ordered by _updated descending...
michael
@michael
8 years ago
7,750 posts
Try this one then

* LIST MODULE: Forum
* SEARCH CONDITION 1: forum_post_count | is greater than | 0
* ORDER BY: forum_updated | descending
alt=
LesRinchen
@lesrinchen
8 years ago
109 posts
michael:
Try this one then
* LIST MODULE: Forum
* SEARCH CONDITION 1: forum_post_count | is greater than | 0
* ORDER BY: forum_updated | descending

That got me the correct order, the correct posts displaying. Yay! But the links are still going to non-existing pages referencing the posting profile's name rather than the Community Forum where the posts actually are. We're making progress!
paul
@paul
8 years ago
4,332 posts
There's a bug in the Forum item_list.tpl template. I'll get that fixed up for the next release but have sorted it on your site prior to that.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
alt=
LesRinchen
@lesrinchen
8 years ago
109 posts
Awesome, Paul! That's working now!

Tags