1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00

Fix: news category breadcrumbs

The breadcrumbs for news categories were previously pointing to the
category page but using the id of the news story instead of the id of
the category.

Previously, if you had two news stories with ids 1 and 2, and one
category with id 1, then news story 1 would link to its category,
but news story 2 would link to a 404 page.
This commit is contained in:
Richard Barrell 2023-02-14 22:07:11 +00:00
parent f2af17d45f
commit 6c2e2efc22

View File

@ -107,7 +107,7 @@ class news_front
$itemName = e107::getParser()->toHTML($this->currentRow['news_title'],true, 'TITLE');
$breadcrumb[] = array('text'=> $categoryName, 'url'=>e107::getUrl()->create('news/list/category', $this->currentRow));
$breadcrumb[] = array('text'=> $categoryName, 'url'=>e107::getUrl()->create('news/list/category', array('id'=>$this->currentRow['news_category'])));
$breadcrumb[] = array('text'=> $itemName, 'url'=> null);
break;