Link fields only allow me to link to external URLs

Hello,

I just started a new project using the new Slice machine and custom type builder. So far has been fantastic!

However, I just added a Link field (I'm building the header custom type) and it only allows me to add external links. This is not a problem in my "Page" custom type. I'm not sure if I'm doing something wrong or if it's a bug

The repo is miso3.prismic.io

Thanks you,
Kris

I did a bit of digging in the JSON file and I found that SliceMachine automatically adds

"select": "web"

to my link field.

I removed it and it worked.

Even though there is a simple solution, I'd consider this a bug, as by default it should be both web & internal documents, then you can specify manually if you want to be one or the other.

Hey @kris,

This is by design. Slice Machine can't read your Custom Types, and internal links are designed to be restricted by Custom Type.

Having said that, we've been planning this as an improvement all along, and it's currently in beta. In slice-machine-ui@beta, you can build Custom Types locally. That means you can also add Link fields pointing to internal documents. (I think the link feature is currently included. If not, it is forthcoming.)

If you'd like, you can give it a try and let us know what you think! You can test it out by installing slice-machine-ui@beta. Here's the RFC and the Pull Request. (Or we can keep chatting about it, here.)

Best,
Sam

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.