From 806d6adf413a401893b359c9fea606257090fdfc Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Wed, 8 Nov 2023 11:01:16 -0800 Subject: [PATCH] remove title from search indexed content --- stanford_profile_helper.module | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stanford_profile_helper.module b/stanford_profile_helper.module index 707e62c4..4898d1f1 100644 --- a/stanford_profile_helper.module +++ b/stanford_profile_helper.module @@ -1126,3 +1126,12 @@ function _stanford_profile_is_decoupled(): bool { function stanford_profile_helper_search_api_processor_info_alter(array &$processors) { $processors['custom_value']['class'] = '\Drupal\stanford_profile_helper\Plugin\search_api\processor\CustomValue'; } + +/** + * Implements hook_entity_view_display_alter(). + */ +function stanford_profile_helper_entity_view_display_alter(EntityViewDisplayInterface $display, array $context) { + if ($context['view_mode'] == 'search_indexing' && $context['entity_type'] == 'node') { + $display->removeComponent('title'); + } +}