Webflow + Custom Code

Inline Coding Techniques

Overview
Using Custom Code
100
Custom Code Character Limit
101
Custom Code
HTML Encoding & Decoding
102
Advanced Techniques
Tracking w/ Cookies & Web Storage
600
Inline Coding Techniques
4:41
601
Inline CSS
4:41
602
Webflow.js
Webflow.js
700
Sygnal Webflow Utilities ( WFU )
Sygnal Webflow Utils ( WFU )
800
Helper Functions
802
No items found.
Published
November 24, 2022
in lightbox

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 {&quot;path&quot;:&quot;name&quot;,&quot;type&quot;:&quot;PlainText&quot;\} }}";<br>    }<br>})();<br>

Resources

See an application of this technique in this cloneable;

https://webflow.com/made-in-webflow/website/glossary-headings

Table of Contents
Comments
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.