Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

Building on this answerthis answer:

/** * Implements hook_preprocess_links(). */ function bartik_preprocess_links(&$variables) { if (isset($variables['links']['node-readmore'])) { $variables['links']['node-readmore']['link']['#title'] = t('Read more custom text'); } } 

does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.

Building on this answer:

/** * Implements hook_preprocess_links(). */ function bartik_preprocess_links(&$variables) { if (isset($variables['links']['node-readmore'])) { $variables['links']['node-readmore']['link']['#title'] = t('Read more custom text'); } } 

does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.

Building on this answer:

/** * Implements hook_preprocess_links(). */ function bartik_preprocess_links(&$variables) { if (isset($variables['links']['node-readmore'])) { $variables['links']['node-readmore']['link']['#title'] = t('Read more custom text'); } } 

does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.

improved question
Link
oksana-c
  • 2.8k
  • 1
  • 13
  • 26

Limit ChangedChange to Read More ChangeLink in Node Teaser to One Content Type

added 294 characters in body; edited tags
Source Link
J. Reynolds
  • 6.4k
  • 2
  • 18
  • 28

Building on this answer,:

/** * Implements hook_preprocess_links(). */ function bartik_preprocess_links(&$variables) { if (isset($variables['links']['node-readmore'])) { $variables['links']['node-readmore']['link']['#title'] = t('Read more custom text'); } } 

does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.

Building on this answer, does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.

Building on this answer:

/** * Implements hook_preprocess_links(). */ function bartik_preprocess_links(&$variables) { if (isset($variables['links']['node-readmore'])) { $variables['links']['node-readmore']['link']['#title'] = t('Read more custom text'); } } 

does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.

Source Link
Loading