You are viewing an older version of the Shortcut documentation (4.x). View the latest version (5.x) →
Feature Tour

Usage

To create a short url for an element:

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

{{ shortcut.getUrl() }}

To create a short url for a url:

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

{{ shortcut.getUrl() }}
Last updated: May 2, 2026, 3:23:57 PM