Closed proimage closed 2 months 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"
.
Could this also be added to the GraphQL interface?
Added for the next release. To get this early, run composer require verbb/formie:"dev-craft-4 as 2.0.4"
.
It looks like it's been added to GQL in the 2.0.4 release, but for some reason it's not there when I install that version with composer. Do I need something else?
This hasn't been tagged in a release yet, it's still on the dev-craft-4
and dev-craft-5
branches, which is the reason for the above command to alias those branches as the latest tagged version available. It doesn't mean this feature is on 2.0.4.
For reference:
{
entries(id: 1234) {
... on myEntryType_Entry {
hyperField {
linkUri
}
}
}
}
Added in 2.0.5
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