presseddigital / linkit

Linkit Plugin for Craft 4
Other
28 stars 18 forks source link

Add ability to return the uri of a linked element #115

Open JayBox325 opened 6 months ago

JayBox325 commented 6 months ago

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.

samhibberd commented 6 months ago

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

{{ entry.linkitField.element.uri }}
JayBox325 commented 6 months ago

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

samhibberd commented 6 months ago

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