From e9a3784f41202fb2011858c0b974d7303564606f Mon Sep 17 00:00:00 2001 From: Keegan Rankin Date: Wed, 30 Aug 2023 13:30:17 -0700 Subject: [PATCH] Remove authoring details from title paragraph, to be displayed on every node with authors --- web/themes/custom/agarica/agarica.theme | 25 ------------------------ web/themes/custom/agarica/patternlibrary | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/web/themes/custom/agarica/agarica.theme b/web/themes/custom/agarica/agarica.theme index b481d72..f33ab51 100644 --- a/web/themes/custom/agarica/agarica.theme +++ b/web/themes/custom/agarica/agarica.theme @@ -18,22 +18,6 @@ function agarica_preprocess_node(&$variables) { $allowed_regions = ['secondary_menu']; agarica_add_regions_to_node($allowed_regions, $variables); } - $field_body_paragraph = $variables['elements']['field_body_paragraph'] ?? NULL; - if (isset($field_body_paragraph)) { - $max_key = max(array_map('intval', array_keys($field_body_paragraph))); - for ($i = 0; $i <= $max_key; $i++) { - if ($field_body_paragraph[$i]['#paragraph']->getType() === 'title') { - - $renderer = \Drupal::service('renderer'); - - $authors_html = $renderer->render($variables['content']['field_authors']); - $date_html = $variables['date']; - - $field_body_paragraph[$i]['#paragraph']->authors_html = $authors_html; - $field_body_paragraph[$i]['#paragraph']->date_html = $date_html; - } - } - } } /** @@ -137,12 +121,3 @@ function agarica_languague_switch_link() { return $links_render_array; } - -/** -* Implements hook_preprocess_HOOK() for field__field_title template. -*/ -function agarica_preprocess_paragraph__title(&$variables) { - $field_title = $variables['content']['field_title']['#object']; - $variables['authors'] = $field_title->authors_html; - $variables['date'] = $field_title->date_html; -} diff --git a/web/themes/custom/agarica/patternlibrary b/web/themes/custom/agarica/patternlibrary index be59bfd..5c64104 160000 --- a/web/themes/custom/agarica/patternlibrary +++ b/web/themes/custom/agarica/patternlibrary @@ -1 +1 @@ -Subproject commit be59bfdb2c1479bc06106b3e6944c9e9062df1b3 +Subproject commit 5c64104e87d2d77a926edfcd13ddbf1c3f022815