Link to existing content from MD-editor

Maybe a dumb question, but how can I link to existing Contentful-content from the MD-editor?
If I click the link-button the only option I have is to link to a url. The User Experience in other Content Management Systems is mostly that I can choose between a url or existing content. Just like linking to media.

Hi @gert.van.vliet,

It’s not possible to resolve field values, or link an entry “inside” a long-text field, as that would imply generating fairly long and convoluted long-text field values.

Instead, you can use referencing fields to link entries from other content models across your space. These values will be referenced as objects containing a sys property with the type and ID of the resource, and you could later resolve the contents of it inside your parent entry response if you’re using one of our SDKs. For example, this is how you’d do it with our JavaScript SDK:

Let me know if that makes sense :slight_smile:

It certainly does make sense. I still hope Contentful will support this functionality, because I think it will make the product more mature.


With respect, I think you haven’t yet quite grasped the concept of Contentful and therefor don’t quite understand why the feature you’re proposing is near-impossible or at the very least impractical to archive.

The reason why traditional CMS’s like Drupal are able to link internally to existing content is because they include also include the presentation layer and more importantly, routing. Traditional Content Management Systems are actually more like Website Management Systems where as Contentful is Content Management System in the truest sense of the word.

Because Contentful does not include any kind of presentation layer, it is not aware of the routing i.e. how the application that displays your content forms the URLs. In other words, Contentful is not in any way aware of the URLs of your website, therefor it cannot link internally to any such URLs.

The only even remotely feasible way to archive this would be to add just some kind “ID anchor” to the Markdown data, which would in return require a special functionality in the presentation application that searches and replaces these anchor IDs in the Markdown by first fetching the content from Contentful using the ID and then building a route URL for that content.

I think I do understand the concept of Contentful very well, but I also see the needs of business users.

In my opinion it would perfectly fit the concept of Contentful if a reference can be made to another item in Contentful. It’s up to the developer to translate it to functionality. This doesn’t necessarily have to be a url. The content of the referenced item could also be used to displayed directly on the page in a tooltip or an off canvas item.

How does including a dialog like below break the concept of Contentful?

I challenge you to think the issue other way around :wink:

The UI concept you are proposing is simple, but the difficult question is what happens on the API level? What is included in the Markdown content in the API’s response?

Thank you all for raising these great points.

@teemu.tammela1’s explanation certainly nails it and, from a content infrastructure perspective, it is certainly a better idea to stick to referencing fields and avoid this behaviour.

Still @gert.van.vliet , I understand where you’re coming from and I already made our product team aware of your feedback to perhaps find means to simplify this for business users. :wink:

1 Like

Hey @gert.van.vliet,

I am a product manager at Contentful, responsible for the Authoring experience, so your feedback in this thread is relevant to our line of work.

We are currently working on a feature where we believe that we might be able to bridge the business users needs in the specific example you’re mentioning and @teemu.tammela1’s very valid concerns about the API response.

I created a topic in the Announcements channel which holds all the information for this feature including how to get this feature to your test space: Structured Text field type Alpha

Let me know if you have any questions.


1 Like