-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Craft 5] Allow modifying link type handle #218
Comments
There's certainly some "magic" going on behind the scenes to generate the handle for a link type, and I wasn't overly thrilled about how it all ended up, which is based on the class (not the label, which is translatable). That's because I wanted to simplify link types by not requiring you to enter a handle. In future Hyper versions, I believe I'll go the route of allowing you to manage that. It'll also make programmatically creating links a bit more clearer. But, I'd want to save that large of a change for a major version, in case of breaking changes. But more to the point, I can see I'm incorrectly referencing the link type label in the GraphQL type. That at least is fixed for the next release. To get this early, run |
Totally understand that! Your fix actually allowed us to do exactly what we wanted. We don't need to be able to modify the handle for this. Thank you very much! |
What link types do you have enabled for the field? |
We have Entry, Asset, URL, Email and Phone for this field. |
Very strange, it's stating that there are no linkTypes configured for the field. I'll continue investigating. |
What are you trying to do?
We have a client that wants their CMS in french, which involves translating field labels. When trying to modify Hyper link type labels, the handle and the Graphql type are automatically modified, based on the label value.
This is already bad in and of itself because in our frontend code we rely on our Graphql types to remain constant.
Another problem caused by this is that some characters used in french (like accents) are not supported, which makes the whole Graphql API crash. That means we can't properly translate CMS user-facing labels.
What's your proposed solution?
The link type label setting should support any character for proper localization, and the link type handle (on which I assume the Graphql type is based on) should by modifiable independently of the label.
Additional context
No response
The text was updated successfully, but these errors were encountered: