URL Field

URL Field

The url field stores a link destination.

Best For

  • CTA links
  • external destinations
  • supporting resource links
  • download destinations

Schema Example

{ "name": "ctaUrl", "label": "CTA URL", "type": "url" }

Template Usage

<a href="{{ ctaUrl }}">{{ ctaLabel }}</a>

With fallback logic:

{{#if ctaUrl}}
  <a href="{{ ctaUrl }}" class="btn-primary">{{ ctaLabel | default("Learn more") }}</a>
{{/if}}

Use It When

Use url when the field represents a destination and should be treated like a link.

Do Not Use It When

Do not use url for:

  • generic text fields
  • button labels
  • file uploads

Use text, file, or another field type instead.

Technical Notes

  • use url for destinations only, not for visible labels
  • guard optional URLs with {{#if}} so empty links do not render
  • keep link destination and link label in separate fields
  • use a dedicated file field when the destination should be a managed download asset