From 9f76b669c9b7741fbc51bf3be2cae9ac80fe85f5 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 31 Dec 2024 16:14:38 +0100 Subject: [PATCH] (cp a3833eab9) fixes #2300 search engine robots should not index/follow combined categories --- include/section_init.inc.php | 8 ++++++++ themes/default/template/menubar_related_categories.tpl | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/section_init.inc.php b/include/section_init.inc.php index d311b5043..2f751864e 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -613,6 +613,14 @@ elseif ('search'==$page['section']) { $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); } +elseif ('categories' == $page['section']) +{ + if (isset($page['combined_categories'])) + { + $page['meta_robots'] = array('noindex'=>1, 'nofollow'=>1); + } +} + if ( $filter['enabled'] ) { $page['meta_robots']['noindex']=1; diff --git a/themes/default/template/menubar_related_categories.tpl b/themes/default/template/menubar_related_categories.tpl index 302421c60..fea1ccfa5 100644 --- a/themes/default/template/menubar_related_categories.tpl +++ b/themes/default/template/menubar_related_categories.tpl @@ -12,9 +12,9 @@ {/if}
  • {if isset($cat.TITLE)} - {$cat.name} + {$cat.name} {else} - {$cat.name} + {$cat.name} {/if} {if isset($cat.count_images) and $cat.count_images > 0} {$cat.count_images}