Usage

Template Usage

FreeLink fields return a LinkCollection that proxies to the first link in single-link mode:

{# Single link mode #}
{{ entry.myLink.url }}
{{ entry.myLink.text }}
{{ entry.myLink.link }}
{{ entry.myLink.element.title }}

{# Multi-link mode #}
{% for link in entry.myLinks.all %}
  <a href="{{ link.url }}">{{ link.text }}</a>
{% endfor %}

{# Reverse lookups #}
{% set relatedEntries = craft.freelink.getRelatedElements(entry) %}

Element Resolution

Element links (entry, asset, category, user, product, variant) resolve their target element automatically when accessed — no .with() needed. Because the field value is a LinkCollection value object, FreeLink fields are not passed to Craft’s .with([...]) eager loading; elements resolve lazily on access.

Migration

FreeLink includes console commands to migrate from other link field plugins. Always preview with --dry-run first.

# Migrate from Verbb Hyper
php craft freelink/migrate/from-hyper --field=myLinkField --dry-run

# Migrate from Linkit
php craft freelink/migrate/from-linkit --field=myLinkField --backup

# Migrate from Typed Link Field
php craft freelink/migrate/from-typed-link --field=myLinkField

# Migrate from native Craft Link field
php craft freelink/migrate/from-craft-link --field=myLinkField

# Check migration status
php craft freelink/migrate/status

More in Frontend

Pairs well with FreeLink

Building blocks for templates. Navigation, links, tables, embeds, icons, notification bars, favicons and installable web apps.