Skip to content

Commit

Permalink
remove title from search indexed content
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 8, 2023
1 parent 4aaca78 commit 806d6ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stanford_profile_helper.module
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

0 comments on commit 806d6ad

Please sign in to comment.