Join the Webstudio community

Updated 3 months ago

Is there a way to bind on click events to a collection

At a glance
<button onclick="fetchData('casino_features')">Casino Features</button>
<button onclick="fetchData('payment_methods')">Payment Methods</button>
<button onclick="fetchData('licenses')">Licenses</button>
<button onclick="fetchData('languages')">Languages</button>
<button onclick="fetchData('providers')">Providers</button>

i have a test called fetchData which takes these arguments. the buttons are created through a collection and the collection contains the variable title. is there a way to bind this. or will i need to self host and do some magic outside of webstudio.
O
A
8 comments
Lets go back for a second and define what you want to achieve
clicking on button to filter data fetched from a resource?
so im trying to create a filter system
Attachment
image.png
ok will check this out ty πŸ˜„
i think my issue will be how my cms works but will check this first
ok so I need to stay with my current cms which has limited filtering atm. To do what i need I just need to have it so i can run a different request on each dynamic page and then the last part of the url will be the filter.
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord