From bb62b05c30ae0306c2db4741051ebc59168bc59d Mon Sep 17 00:00:00 2001 From: nJim Date: Mon, 10 Jul 2023 22:42:00 -0400 Subject: [PATCH] fix (YALB-597): enable linkit for homepage setting --- .../modules/custom/ys_core/src/Form/SiteSettingsForm.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php index 00a01d21b8..a90a07f380 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/src/Form/SiteSettingsForm.php @@ -111,11 +111,15 @@ public function buildForm(array $form, FormStateInterface $form_state) { ]; $form['site_page_front'] = [ - '#type' => 'textfield', - '#description' => $this->t("Specify a relative URL to display as the front page."), + '#type' => 'linkit', '#title' => $this->t('Front page'), + '#description' => $this->t("Specify a relative URL to display as the front page. Typically this points to a page in Drupal and is referenced by a node id. Use this autocomplete field to select the correct node."), + '#autocomplete_route_name' => 'linkit.autocomplete', '#default_value' => $siteConfig->get('page')['front'], '#required' => TRUE, + '#autocomplete_route_parameters' => [ + 'linkit_profile_id' => 'default', + ], ]; $form['site_page_posts'] = [