Filter a nested collection by Current User Info


How i create filter by current user Info ?

For exemple :
In a form, I use [wfu-data-type=“list-collection”] for a SELECT input, and I want filteing this one by my curent name user.


Hi Coluf,

The current user info is best accessed through the callback function. The function you setup in CUI configuration will be called when the data is ready, and you can then use it to run your filter scripts.


Can you give an example of this?
I have a Collection List that i saved the user email.
Now I want to filter a collection list to only show the items with the email equal to who is signed in.

I have already created the CMS creation with Webflow Logic and added the email with data-binding to an input.
I Just need a way to show my own creations now by this filer :slight_smile:

I Solved it by using Finsweets attributes CMS Filter

1 Like

Exactly how I’d generally do this. Keep in mind these issues however;

  • The data belonging to other users is still in the page and can be seen in the source code
  • Javascript MUST be enabled for this to work
  • When you end up with a lot of users, with a lot of content, you also need to confront the 100-item collection list limit. Finsweet’s CMS load more can help there.
  • Finsweet only shows the filtered items in the code. So the first issue is not an issue.
  • What issue do you see in Javascript beeing enabled?
  • So webflow has an limit of 100 CMS items to show? Doesnt it get solved with pagination?

Yes and no. Finsweet is acting on Webflow’s published page, which must have ALL of the content in order to filter it. After Finsweet’s scripts run, you see the restricted content, but that date is still stored in memory and in the browser and it was never secured to begin with.

Most of my hardcore dev friends use the Internet with javascript disabled. Here, you’d see Webflow’s paginated collection list with all of the data. Finsweet cannot secure that.

Pagination lets you get another max-100 items separately, but those are on a different page. Finsweet filter does not know about them. If you also use Finsweet load more, they work together nicely and there are some good UX patterns you can apply here.

It’s important to think of all of these approaches as 100% insecure. The data is there for anyone to look at, if they want to. Likely it will end up in Google’s SERPs as well.

If that data involves any PII or confidential information, you cannot store it in the CMS. You’d need a secured database, and a middleware layer that allows you to “get Bob’s invoices”, prove you have the authority to see them, and then have only Bob’s invoices returned to you for handling.

That’s an app. To build that on Webflow, you want to go down the Wized + Xano route most likely.

I think i understand.
I have a membership site so all people that have a membership can see the content.
So it dosnt matter if people see all of the posts. The security issue for my solution is not important.
In other words eveyone that are signed in can see all of the posts and that is how i want it.
I just want to filter it on different pages so that users can see what they have created.

But i think the problem i have is the 100 max per page. Because the filter does not work if it is more then 100 items if i understand you correctly. It only filters on the first 100 items.
This is if i dont use Finsweets Load More function.
So i will look in to the Load more function to solve that issue :slight_smile:

1 Like