From 85bb6a0fba3f9ab9b7595d9901b988531df9a5a5 Mon Sep 17 00:00:00 2001 From: Brian Canini <canini.16@osu.edu> Date: Tue, 26 May 2020 15:45:57 -0400 Subject: [PATCH] fixing Taxonomy link bug on news and events pages --- web/themes/asc_bootstrap/templates/node/node--event.html.twig | 4 ++-- .../asc_bootstrap/templates/node/node--news-story.html.twig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/themes/asc_bootstrap/templates/node/node--event.html.twig b/web/themes/asc_bootstrap/templates/node/node--event.html.twig index cd614eec13..15b196734b 100644 --- a/web/themes/asc_bootstrap/templates/node/node--event.html.twig +++ b/web/themes/asc_bootstrap/templates/node/node--event.html.twig @@ -239,7 +239,7 @@ {% for item in content.field_evt_taxonomy %} {% if item['#title'] %} <div class="taxonomy-events"> - <a href="/{{ evpattern }}?field_evt_taxonomy_target_id_1={{ item['#url']|render|split('/')|last }}"> + <a href="/{{ evpattern }}?field_evt_taxonomy_target_id_1={{ item['#options'].entity.tid.0.value }}"> {{ item['#title'] }} </a> </div> @@ -250,7 +250,7 @@ {% for item in content.field_evt_taxonomy2 %} {% if item['#title'] %} <div class="taxonomy-events"> - <a href="/{{ evpattern }}?field_evt_taxonomy2_target_id={{ item['#url']|render|split('/')|last }}"> + <a href="/{{ evpattern }}?field_evt_taxonomy2_target_id={{ item['#options'].entity.tid.0.value }}"> {{ item['#title'] }} </a> </div> diff --git a/web/themes/asc_bootstrap/templates/node/node--news-story.html.twig b/web/themes/asc_bootstrap/templates/node/node--news-story.html.twig index b163a5c79b..0af6d73317 100644 --- a/web/themes/asc_bootstrap/templates/node/node--news-story.html.twig +++ b/web/themes/asc_bootstrap/templates/node/node--news-story.html.twig @@ -124,7 +124,7 @@ {% for item in content.field_news_terms_1 %} {% if item['#title'] %} <div class="taxonomy-news"> - <a href="/news?field_news_terms_1_target_id={{ item['#url']|render|split('/')|last }}"> + <a href="/news?field_news_terms_1_target_id={{ item['#options'].entity.tid.0.value }}"> {{ item['#title'] }} </a> </div> @@ -134,7 +134,7 @@ {% for item in content.field_news_terms_2 %} {% if item['#title'] %} <div class="taxonomy-news"> - <a href="/news?field_news_terms_2_target_id={{ item['#url']|render|split('/')|last }}"> + <a href="/news?field_news_terms_2_target_id={{ item['#options'].entity.tid.0.value }}"> {{ item['#title'] }} </a> </div> -- GitLab