Is it possible to use linkit on the core menu link add page?

Created on 11 October 2023, about 1 year ago

First of all thanks for a great module. Very useful.

I was wondering if it is possible to to have the linkit widget available on the core link field at e.g. admin/structure/menu/manage/main/add? This to give the user also the linkit experience more consistently throughout the site.
I am using linkit version 6.0.0 on drupal 9.5.11

Right now I am experimenting with the following custom code but perhaps that there is another way already available through the module or core?

function my_module_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
  if ($entity_type->id() === 'menu_link_content') {
    $fields['link']->setDisplayOptions('form', [
      'type' => 'linkit',
      'weight' => -2,
      'settings' => [
        'linkit_profile' => 'content',
        'linkit_auto_link_text' => TRUE,
      ],
    ]);
  }
}

Thanks for any help or suggestions in advance.

✨ Feature request
Status

Active

Version

6.0

Component

User interface

Created by

πŸ‡³πŸ‡±Netherlands undersound3

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

Comments & Activities

Production build 0.71.5 2024