Showing saved items count in the dashboard Answered
Is it possible for saved cms items by using ''#106 - Liking & Saving CMS Items v0.1'' to show number counts of the saved items on a dashboard?
So lets say in here we got 2 collection of saved items. In total 3 items saved.
In the dashboard it should then tell the number of saved items?
[Dashboard i built in webflow with help of memberstack dashboard templates]
Comments
7 comments
Hey Daniel Bøllingtoft, I believe this should be possible, just have to tweak the setup a bit.
Feel free to modify the content and styling.
Then save and Publish the site.
I have attached a screenshot to clarify the placement of the second step code and have shown you how the output looks like when I test it with multiple collection.
Hope this helps.
Looks nice! Thanks.
The only issue here is that the savedItemsCount has to be displayed on another page.
As for our use case on our site the users can save recipes and see every saved recipes on a /saved-recipes page.
But we would like to display the amount of saved recipes on /user-dashboaard
Hey Daniel Bøllingtoft, yes that should be possible as well.
The difference in the setup would be like:
You can see how it works on the front-end in this video.
I just created another page which does not have any collection items there and just added the code and element above to get the output.
Oh waow! That worked perfectly. Thanks alot!
Just an addtional question.
Would it be possible to assign these scripts to two different collection?
As in our use-case. we got food recipes and drink recipes. So it would be like.
You have (X) food recipes saved.
You have (X) drink recipes saved.
We do already display it in two different collections today in our saved recipes page, but we would love to display the numbers for each one aswell
Great! Welcome 😇
That would be possible, but that will involve changing the structure and logic of the member JSON, segmenting it via collections etc.
Is this use-case too important to the website in order to change the structure and setup?
That's not important enough to change that much.
Our end goal for this function would actually be to make folders to save the items.
So lets say you have saved 5 items. Then you can create folders like: [Dinner], [Breakfast], [Drinks for party]. Inside these, the user should be available to add the saved items.
Main goal would be to make the user available to make the folders. If not possible, then we will try with pre-maded folders.
All this will be on same page /saved-recipes
I think you could opt for pre-defined categories for each collection item, like each item has a category associated with it like dinner / drinks etc. This will keep a cap on the number of custom sections that each user could possibly create and can help you handle it easily and keep the approach simpler for you. And probably use something like Finsweet to give user's a filterable approach. It's worth exploring the use-case though.
Please sign in to leave a comment.