Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JayBox325 opened this issue May 20, 2024 · 3 comments
Open

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

JayBox325 opened this issue May 20, 2024 · 3 comments

Comments

@JayBox325
Copy link

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
Copy link
Collaborator

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

{{ entry.linkitField.element.uri }}

@JayBox325
Copy link
Author

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

@samhibberd
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants