Hi, i have a question regarding CMS filters. If it’s possible, it can open many doors for Nocoders working with Webflow.
So basically we have placed a CMS list on a “non cms page”. We would like to show items that is related to certain users (Memberstack 2.0) with “User equals mem_id”.
This is possible, but is it possible to add the mem_id externally with pure Javascript?
We have placed a text on “My page” that fetches Member ID of the user, and we would like to use Javascript to fetch this Member ID and place it in the CMS filters, is it possible to hack the filters with some JS?
But we have one main site called “My controlpanel” and we would like to show CMS items that is connected to that certain user that is logged in (We receive this data with custom JS and write it a text that is hidden on same page"
So we have the correct ID of the user, but we just need to filter the CMS list based on the mem_id we already have.
Yes, I’ve implemented this before, but remember this will have zero security.
I’m assuming you’re using Webflow Memberships, which offers collection-page gating. That will protect your user-specific CMS data from external users- however it would be accessible by every other user with that same access-group permission.
I’d strongly advice you to think very carefully about exactly what you’re exposing, because it might matter to someone.
So that you understand the design approach though- the part you’re missing is how the collection list filtering works. You cannot filter collection lists dynamically, so on a static page there is no way to filter to the “current user” until Webflow adds that feature to Memberships.
What you can do is use the user’s collection page to do the filtering. All of the collection lists would go directly on your /member collection page.
/member/mem_clcdq3...
Then, you have to retrieve that data from the member page to display it where you want.
If it’s a dashboard style system, you might be able to use that page directly, or IFRAME it.
If you just want pieces of data or raw JSON data, use AJAX style calls to retrieve it.