Forum Discussion
VikasB
8 years agoBoss
Hi dkytasaari FYI you can use out of the box component with required no of topics you want to show on your page. You can update the no of topics here
/t5/bizapps/bizappspage/tab/community%3Aadmin%3Adisplay%3Afront-page-display%3Asettings?setting=layout.recent-threads-module-list-size
But if you really need a customised view then you can use the below code. Some CSS efforts would be needed.
<!-- custom-latest-topic --> <div class="main sub-section"> <#attempt> <div class="community-wrapper"> <#assign latestTopics=rest( "2.0", "/search?q=" + "SELECT subject,board.id,view_href,author.login,post_time from messages where depth = 0 order by post_time DESC limit 5"?url).data.items /> <div class="heading-section item-wrapper"> <div class="go-heading-1 major-sub-section sub-section"><a href="/t5/forums/recentpostspage/post-type/thread">Latest Topics</a></div> </div> <div class="content-section"> <div class="latest-topic-section"> <#list latestTopics as topic> <div class="thread-wrapper item-wrapper"> <div class="content sub-section"> <div class="subject detail go-body-1"> <a href="${topic.view_href}">${topic.subject}</a> </div> <div class="board detail go-body-2"> <#assign boardDetail=rest( "2.0", "/search?q=" + "SELECT title,view_href from boards where id = '${topic.board.id}'"?url).data.items[0] /> <a href="${boardDetail.view_href}">${boardDetail.title}</a> </div> <div class="post-detail detail"> <spna class="Author detail go-body-2 go-light">Author: ${topic.author.login}</spna> <span class="seprater count"></span> <spna class="post-time detail go-body-2 go-light">Date: ${topic.post_time?date}</spna> </div> </div> </div> </#list> </div> </div> </div> <#recover> <!-- Error in Latest Topic --> </#attempt> </div>
When you click on the text Latest Topics it would redirect you to a separate page having all the latest topics.
dkytasaari
8 years agoAce
Thanks VikasB, this gives me some more information to experiment with.
Related Content
- 4 years agoInactive User
- 6 months ago