Feature Tour

Usage

To create a short url for an element:

{% set shortcut = craft.shortcut.get({ element: entry }) %}

{{ shortcut.getUrl() }}

If an external provider is configured, getUrl() will return the shortened URL from that provider. Otherwise, it returns Shortcut’s local URL.

To create a short url for a url:

{% set shortcut = craft.shortcut.get({ url: 'https://my-site.test' }) %}

{{ shortcut.getUrl() }}
Last updated: June 6, 2026, 9:19:01 AM