Loading core/modules/node/node.module +4 −1 Changes for core/modules/node/node.module: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -476,8 +476,11 @@ function node_theme_suggestions_node(array $variables) { */ function template_preprocess_node(&$variables) { $variables['view_mode'] = $variables['elements']['#view_mode']; // Provide a distinct $teaser boolean. // The teaser variable is deprecated. $variables['deprecations']['teaser'] = "'teaser' is deprecated in drupal:11.1.0 and is removed in drupal:12.0.0. Use 'view_mode' instead. See https://www.drupal.org/node/3458185"; $variables['teaser'] = $variables['view_mode'] == 'teaser'; $variables['node'] = $variables['elements']['#node']; /** @var \Drupal\node\NodeInterface $node */ $node = $variables['node']; Loading core/modules/node/templates/node.html.twig +0 −1 Changes for core/modules/node/templates/node.html.twig: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ * - title_suffix: Additional output populated by modules, intended to be * displayed after the main title tag that appears in the template. * - view_mode: View mode; for example, "teaser" or "full". * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. * - page: Flag for the full page state. Will be true if view_mode is 'full'. * - readmore: Flag for more state. Will be true if the teaser content of the * node cannot hold the main body content. Loading core/themes/olivero/olivero.theme +1 −1 Changes for core/themes/olivero/olivero.theme: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ function olivero_preprocess_maintenance_page(&$variables) { function olivero_preprocess_node(&$variables) { // Remove the "Add new comment" link on teasers or when the comment form is // displayed on the page. if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) { if ($variables['view_mode'] === 'teaser' || !empty($variables['content']['comments']['comment_form'])) { unset($variables['content']['links']['comment']['#links']['comment-add']); } Loading Loading
core/modules/node/node.module +4 −1 Changes for core/modules/node/node.module: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -476,8 +476,11 @@ function node_theme_suggestions_node(array $variables) { */ function template_preprocess_node(&$variables) { $variables['view_mode'] = $variables['elements']['#view_mode']; // Provide a distinct $teaser boolean. // The teaser variable is deprecated. $variables['deprecations']['teaser'] = "'teaser' is deprecated in drupal:11.1.0 and is removed in drupal:12.0.0. Use 'view_mode' instead. See https://www.drupal.org/node/3458185"; $variables['teaser'] = $variables['view_mode'] == 'teaser'; $variables['node'] = $variables['elements']['#node']; /** @var \Drupal\node\NodeInterface $node */ $node = $variables['node']; Loading
core/modules/node/templates/node.html.twig +0 −1 Changes for core/modules/node/templates/node.html.twig: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ * - title_suffix: Additional output populated by modules, intended to be * displayed after the main title tag that appears in the template. * - view_mode: View mode; for example, "teaser" or "full". * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. * - page: Flag for the full page state. Will be true if view_mode is 'full'. * - readmore: Flag for more state. Will be true if the teaser content of the * node cannot hold the main body content. Loading
core/themes/olivero/olivero.theme +1 −1 Changes for core/themes/olivero/olivero.theme: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ function olivero_preprocess_maintenance_page(&$variables) { function olivero_preprocess_node(&$variables) { // Remove the "Add new comment" link on teasers or when the comment form is // displayed on the page. if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) { if ($variables['view_mode'] === 'teaser' || !empty($variables['content']['comments']['comment_form'])) { unset($variables['content']['links']['comment']['#links']['comment-add']); } Loading