Open proimage opened 2 weeks ago
We can't use uri
because that's being used by the Element class that Links inherit from, but linkUri
is an option.
Added for the next release. To get this early, run composer require verbb/hyper:"dev-craft-4 as 1.1.32"
or composer require verbb/hyper:"dev-craft-5 as 2.0.2"
.
What are you trying to do?
Sometimes, I need to get the URI of an entry, i.e. the URL minus the
siteUrl
variable: URL:https://www.example.com/path/to/my-entry
URI:/path/to/my-entry
This is useful when sharing a local DDEV site via
ddev share
; the site gets served at something like ahttps://[mini-UID].ngrok-free.app
domain. When URLs on the site havehttps://my-site.ddev.site
prepended to them, then no links will work on the NGROK domain.What's your proposed solution?
Along with the existing variables for links, provide a
uri
variable, which will not include the site domain, only a root-relative (/something
) path.Additional context
No response