Member recent posts
Hi to all,
I have questions from community members "I can't find my posts that i posted, where to see if somebody replyed to my query".
Instead of searching through categories and posts, basically they can go to their profile page and see widget for their recent posts, that widget is ".lia-component-forums-widget-recent-messages"
If they click on View all in that widget they go to /t5/forums/recentpostspage/post-type/message/user-id/4
So, I want to make ONE LINK for members on Homepage named "Your recent posts" and linked to that page /t5/forums/recentpostspage/post-type/message/user-id/
But how can i make that link for all users, cause member ID on end is dinamically and it depends on user ID which is loged in community?
Any suggestions....?
thanks a lot.
Puljac- we created a custom component for one of our communities that shows the user their five most recent posts. Here's a code snippet that shows how you can do this:
<#if user.id != -1> <div class="RecentPosts"> ... <#assign recentPosts = rest("/users/id/${user.id}/posts?page_size=5&restapi.response_style=view").node_message_context.message /> <ul> <#list recentPosts as recentPost> <li><a href="${recentPost.@view_href}">${recentPost.subject}</a></li> </#list> </ul> ... </div> </#if>