How to create URL-specific comments on Webflow dynamic pages using Memberstack and Xano without cross-page syncing?
How would I go about making URL specific commenting in a collection page in Webflow? Thank you!
How would I go about making URL specific commenting in a collection page in Webflow? Thank you!
Comments
11 comments
Hey Spencer Moser, do you mean you want to keep the comments unique for each CMS collection page?
If yes, I have seen people use data-ms-channel={{CMS ID}} or any unique value from the CMS that you are looking to separate the channels by. This will ensure you have unique chat history for every CMS page.
Let me know if you mean something else.
Hey A J So all I would need to do is add an attribute to a div block surrounding the commenting components?
Hey Spencer Moser, ideally if you have cloned the commenting component of memberstack you would already have this attribute in the comment-channel div block, you would just need to fill it with appropriate CMS value that you want.
For reference, in the commenting component that I cloned, I can see that the comment-channel div had a attribute data-ms-channel along with data-ms-channel-sort attribute. I just mapped the CMS ID in my example for the data-ms-channel attribute as highlighted in the screenshot. You can check the navigator in screenshot for reference as to where this div resides as well.
Awesome -- this is so helpful. It worked -- appreciate the help A J
Hopefully someone here can help me with a weird behavior I can't figure out:
Im using memberstack comments system in webflow with wized and xano, I added a comment block at the bottom of a dynamic page that is populated with data from wized/xano, and as of right now, when ever a user adds a comment on a specific car profile, it adds that comment to all car profiles..
Hey Andy Hubright, have you set the data-ms-channel attribute value for the commenting component as the slug of the dynamic page that you are setting the component in?
If you see the first attribute listed here, the 'id' can be dynamically replaced by the webflow collection item slug, so that the comments are unique for each dynamic page that you have. In case its not a unique slug, chances are its treating the commenting section as one category, so adding the slug value would solve your issue. Hope this helps.
A J ah ok, I think I follow, let me try this path and I’ll get back to you, thanks for the response
A J am i supposed to add that attribute to the "comment-channel" div?
Only problem is that it's not a webflow collection, the data is coming from wized/xano.. is that a problem?
The slug in webflow is /cars and then the actual URL comes from wized/xano, for example:
/cars?id=QSkYFMVX574zhv
Yes, Andy Fisher, most probably you will already have the data-ms-channel attribute with empty or some value in the 'comment-channel' div. You can edit the value of it as per your usecase.
Hmm, I am assuming the pages are gonna have unique URLs, if yes, you just need to find a way to have the slug in the value for the data-ms-channel attribute. In case the slug is not unique, but you have any other unique ID via which you can ascertain the difference from one page to another, you can use that value as well such as IDs. The slug is just one way of going about it if you can access the slug via collection, if not anything unique will do as per your use-case.
A J Hmm sorry I'm not following.. since the final URL is not dictated in webflow, all I have in webflow is /cars - so what should I put in the attributes?
Does this look correct?
Okay got it, in that case I would suggest you can take inspiration from this memberscript for accessing the URL parameter (which in your case might be 'id' as per the example you shared) and instead of prefilling the form, you can set attribute value by taking inspiration from this memberscript, combining both these use-cases you can have a simple custom code which will dynamically set the data-ms-channel attribute value to the ID or the unique channel name that you want for each page.
Ah great ok, thanks so much for the guidance
Please sign in to leave a comment.