Published
November 24, 2022
Useful Techniques
- Use inline HTML Embeds with custom code, within collection list items to make small modifications to individual items.
- Use IIFE's to protect your global variables.
- Use self-element referencing and closest() to identify the collection item element easily.
<br>(function() {<br> var currentScript = document.currentScript;<br> var link = currentScript.closest('a');<br> if (link) {<br> link.href = "#glossary-group-{{wf {"path":"name","type":"PlainText"\} }}";<br> }<br>})();<br> Resources
See an application of this technique in this cloneable;
https://webflow.com/made-in-webflow/website/glossary-headings
