linkit icon indicating copy to clipboard operation
linkit copied to clipboard

Add ability to return the uri of a linked element

Open JayBox325 opened this issue 1 year ago • 3 comments

The full path requires me to either set the DEFAULT URL on the CMS (which is different for production & local) or strip the CMS URL from the url in the front-end, which I'd rather not do.

If this could be handled by returning a uri this would make this a lot smoother to use.

JayBox325 avatar May 20 '24 14:05 JayBox325

Unless i’m misunderstanding, you can access the craft element via the field:

{{ entry.linkitField.element.uri }}

samhibberd avatar May 20 '24 16:05 samhibberd

Ahh, sorry, my mistake. I meant within GraphQL. It doesn't seem to return anything in my GQL queries.

JayBox325 avatar May 20 '24 19:05 JayBox325

Ah ok, will take a look, if you have any examples that you can share that would be really helpful.

samhibberd avatar May 21 '24 06:05 samhibberd