Integrate Linkit

Created on 11 May 2021, almost 4 years ago
Updated 14 November 2023, over 1 year ago

Problem/Motivation

The link control / 'search-content' API entry currently runs an entity query on nodes only, and generates a link tag with a static href, along with data attributes for the node ID which AFAICT aren't used to dynamically update the href should the target node's path change. It would be useful to integrate with Linkit as a URL picker to (a) expand search to any entity type and (b) use Linkit's substitution method and text filter to dynamically set the link's href on render.

Proposed resolution

A quick/dirty POC patch is attached which just alters the search controller's search method if Linkit is installed, using the Linkit profile 'default'. NB the patch sets the link's data-id attribute to use the UUID, not the ID, since Linkit can return results from any entity type.

Remaining tasks

A fully fledged version is being worked on to add a new control which will allow selecting the Linkit profile and will output HTML that will be processed by Linkit's text filter.

💬 Support request
Status

Needs review

Version

2.0

Component

Code

Created by

🇨🇦Canada bgilhome Victoria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024