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: Oct 10, 2026, 9:58:12 AM