Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Embed latest discussions only on home page of concrete5 website
elena
New
Hi, I have concrete5.7 website, that use vanilla forum and js connect (finally working!).
I have the forum embeded on my forum page, but I also need to show 3 latest discussions on home page.
Can someone help me with that?
Thanks
Elena
Tagged:
0
Comments
You can fetch each page in json format by appending
?DeliveryMethod=JSON
at the end of the url. You wouldn't need the complete page, so you should also add&DeliveryType=VIEW
like that https://vanillaforums.org/discussions?DeliveryMethod=JSON&DeliveryType=VIEWKeep in mind you can limit the number of discussions you load that way.
I would suggest using Latest Post List and loading the module via js as the default view includes the options and meta list.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
How? I thought it would always send the number of discussions per page.
@R_J
https://vanillaforums.org/discussions/1-3/?DeliveryMethod=JSON&DeliveryType=VIEW
More page selectors defined here: https://github.com/vanilla/vanilla/blob/8e72e481c34a66d98d70284b8171b747c47c3e65/library/core/functions.general.php#L2056-L2112
Examples:
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
that is the first three, not the last three.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
The discussions view is sorted by latest first. So the latest 3 discussions.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
count is off if announcements. but you are correct it is the latest first.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
ok the announcements is included.
there are no announcements here and it returns two.
https://vanillaforums.org/categories/tutorials/1-2/?DeliveryMethod=JSON&DeliveryType=VIEW
whereas the announcement is included here.
https://vanillaforums.org/discussions/1-3/?DeliveryMethod=JSON&DeliveryType=VIEW
3 plus one announcement.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.