I want my users be able to bookmark a post and only then it should be displayed on their profile page under bookmark system. How to go bout it
I think there are multiple ways to achieve this.
One could be to add a âPostâ list to your user data definition, letâs call it âBookmarkedPostsâ.
When a user click on the bookmark button of a post, you simply add the post to the âBookmarkedPostsâ of the user.
Then on the profile page of the user, you display the bookmarks in a repeating group with the data source as the âBookmarkedPostsâ.
But if I do that then everytime any user will click on save bookmark button then there will be a bookmark created which will be shown in each and every userâs profile. Isânt it ?
Put constraints to only return bookmarks created by the current user.
Okay, so I tried your method. Although it works perfectly but there is a small issue with my app. Wel,l I want my users to be able to click the title of the post and then be taken to a page where the users will see the post in a detailed manner.
The page where the user will be shown the post has the type âpostâ and thus when I try sending the data from my user profile to this page there is an error as the display page has different type content i.e. âPostâ but the data being sent is of different nature i.e. âUserâ.
How could I overcome this problem ?
If have a repeating group of Posts, you would change the âData to sendâ when the Title is Clicked, to be âCurrent cellâs Postâ instead of âCurrent Userâ or âCurrent Page Userâ Since you want the clicked on Postâs data to be sent to the detailed Post page, that should do it!
The detail_post is the page where the posts are displayed and in the data to send i canât find current cellâs post. Whatâs wrong ?
@fayewatson
Ohh, I thought that you had a repeating group of Posts that Users could bookmark. I might be misunderstanding the pageâs setup - can you share a link to the editor?
yeah sure. I do have a repeating group.
In the saved post section you will find the repeating group for displaying the post title.
@fayewatson
Ok cool For the repeating group of saved posts (contents), I just changed the type of content from User to âcontentâ and then the data source is âCurrent Userâs userbookmarksâ (this will display the list of the Current Page Userâs bookmarks, which is a list of contents).
When the contentâs title is clicked, the page goes to the post_detail page, with the data to send being âCurrent cellâs contentâ.
Thanks al ot man. Just one more thing, When the posts are displayed they are displayed as below :
Whereas I want the posts to be displayed one in a cell. That is the repeating cell should only display one post name. Can something be done here ?
@fayewatson
No problem at all Is that the saved posts repeating group? It should only display the title once, unless there are two posts with the same title?
Well, I mean that the saved post repeating group should show only one name in one cell of the repeating group. As of now itâs showing all the names in one cell.
@fayewatson
Hmm, I see that the title is in each cell:
Are you trying to add a separator between the cells? If so you can do:
No no. Not the separator.
You see in the picture above the names are in a separate cell. One cell contains only one title. But in the saved post repeating group they are coming next to each other.
@fayewatson
Ah, my apologies, I thought I had changed the text of the repeating group when changing the repeating groupâs type of content. I just changed the dynamic data to be the postâs title (previously it was displaying data related to the Current Page User which was repeating). Everything should display correctly now.
It works fine. Thanks a lot man.
No problem!