From 9452a2986e2a80fcd59a3ba99d21e0db116ba0c5 Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 26 Feb 2021 18:51:21 +0100 Subject: [PATCH] #3912 e_ROUTE for non pretty news urls --- e107_plugins/news/news.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/e107_plugins/news/news.php b/e107_plugins/news/news.php index 18c72d679..3eeb22c04 100644 --- a/e107_plugins/news/news.php +++ b/e107_plugins/news/news.php @@ -553,16 +553,21 @@ class news_front case "all": e107::meta('robots', 'noindex'); - + e107::route('news/list/items'); break; case "tag": + e107::title($this->subAction); + e107::meta('og:title', $this->subAction); + e107::meta('robots', 'noindex'); + e107::route('news/list/tag'); + break; case "author": e107::title($this->subAction); e107::meta('og:title', $this->subAction); e107::meta('robots', 'noindex'); - + e107::route('news/list/author'); break; case "list": @@ -571,7 +576,7 @@ class news_front e107::title($title); e107::meta('og:title', $title); e107::meta('robots', 'noindex'); - + e107::route('news/list/category'); break; case "day": @@ -596,15 +601,25 @@ class news_front e107::title($title); e107::meta('og:title', $title); e107::meta('robots', 'noindex'); + + if($type == 'day') { + e107::route('news/list/day'); + } + else { + e107::route('news/list/month'); + } + break; case "news": e107::canonical($this->route, $news); + e107::route('news/view/item'); break; default: e107::meta('robots', 'noindex'); + e107::route('news/list/items'); // e107::canonical('news'); }