Score:0

How to make an entity reference field only load a rendered entity, when clicking on it? (ajax load on click)

cn flag

I want to mimic a zettelkasten system, by starting in a very simple way:

An entity of type 'Note' includes a body and an entity reference field, that can reference another note (of the same entity type) as fully rendered embedded entity.

I like to make the viewed note only display the entity reference field as link, but when I click on it the referenced link must turn into a fully rendered entity.

I understand this needs some ajax load on click, but I'm not a programmer. I see there is this module: Entity Reference Ajax Formatter, but that applies ajax as 'load more' link, and does turn a clickable link into a rendered entity.

How could this be accomplished?

mx flag
This module is probably what you're looking for: [Ajax link](https://www.drupal.org/project/ajax_link). [Colorbox Load](https://www.drupal.org/project/colorbox_load) helps if you want the content in a "lightbox", and this one is a more complex solution.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.