I am trying to create a copy to clipboard button but instead of copying a preset text I want it to get a link for the CMS Item it relates to. So for example:
I have a collection list and each list has a slug/link that gets attached to it.
Once the user clicks the buttons, I want that link to be copied.
I don’t want to have to create a link for each button for each list item.
Here is my site Read-Only: LINK
(how to share your site Read-Only link)
Hey @tsantarem, may have found a solution for you. Utilizing GraphicOwls - Copy to Clipboard snippet.
When editing a
collection page, in the custom code section, you can
Add Fields (essentially the attributes of the collection item) within your custom code. So essentially, if you take GraphicOwls’ snippet and use it within the
custom code section of a collection page, you can do this:
Hope this helps!
Thank you! I think this code should work. I want to find a way to make it work outside a collection page, maybe by referencing the collection list. The page I am working is a long list of collection items and it should have a copy link button. But these items are populated automatically in the page. See example:
@tsantarem, I see what you are looking for. The website you have shared utilizes clipboard.js plugin which does have a way to work with Webflow’s CMS.
I found an article that sets up a Webflow CMS with clipboard.JS which you can read here:
Essentially, if you add an
html embed within your collection, you can utilize the
Add Fields and therefore setup the
Let me know if this helps you out!
Your way worked perfectly and the client is very happy.
I am glad I was able to help out, happy designing!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.