From df4ecad64603815ee3dd0179fdf8d787005ed046 Mon Sep 17 00:00:00 2001 From: Sascha Weidner Date: Sat, 18 Jun 2016 20:21:31 +0200 Subject: [PATCH 1/5] Update ModuleTagListByCategory.php I've added an contao hook "tagSourceTable" whitch is needed if other extensions want to use ur beautiful addon. --- modules/ModuleTagListByCategory.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/ModuleTagListByCategory.php b/modules/ModuleTagListByCategory.php index 93ce935..d3137d4 100644 --- a/modules/ModuleTagListByCategory.php +++ b/modules/ModuleTagListByCategory.php @@ -110,6 +110,17 @@ protected function compile() $this->Template->articles = $this->getArticlesForArticleTags($tagid_cats[$sourcetable]); $pages = array_merge($pages, $this->getPagesForArticleTags($tagid_cats[$sourcetable])); break; + default: + if (isset($GLOBALS['TL_HOOKS']['tagSourceTable']) && is_array($GLOBALS['TL_HOOKS']['tagSourceTable'])) { + $arrTagTemplates = array(); + foreach ($GLOBALS['TL_HOOKS']['tagSourceTable'] as $type => $callback) { + $this->import($callback[0]); + $arrTagTemplates[] = $this->$callback[0]->$callback[1]($sourcetable,$tagid_cats[$sourcetable]); + } + print_r($arrTagTemplates); + $this->Template->other_pages = $arrTagTemplates; + } + break; } } $uniquepages = array(); From 6f6b1fd4b0f9664616c4c79204e7471075e68dff Mon Sep 17 00:00:00 2001 From: Sascha Weidner Date: Sat, 18 Jun 2016 20:22:16 +0200 Subject: [PATCH 2/5] Update mod_tag_listbycategory.html5 Output URL list from other addons --- templates/modules/mod_tag_listbycategory.html5 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/templates/modules/mod_tag_listbycategory.html5 b/templates/modules/mod_tag_listbycategory.html5 index 62f3311..d013fc5 100644 --- a/templates/modules/mod_tag_listbycategory.html5 +++ b/templates/modules/mod_tag_listbycategory.html5 @@ -26,9 +26,19 @@

lngPages; ?>

+ +other_pages)): ?> +

lngOtherPages; ?>

+ From c3b77139c2774e7c1d64d5473808c4d3490eecfc Mon Sep 17 00:00:00 2001 From: Sascha Weidner Date: Sat, 18 Jun 2016 20:23:04 +0200 Subject: [PATCH 3/5] Update mod_tag_listbycategory.xhtml --- templates/modules/mod_tag_listbycategory.xhtml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/modules/mod_tag_listbycategory.xhtml b/templates/modules/mod_tag_listbycategory.xhtml index 62f3311..5029fb1 100644 --- a/templates/modules/mod_tag_listbycategory.xhtml +++ b/templates/modules/mod_tag_listbycategory.xhtml @@ -32,4 +32,14 @@ +other_pages)): ?> +

lngOtherPages; ?>

+
    +other_pages as $url): ?> +
  • + +
  • + +
+ From 6045902e2d9c165b51c7f5c26a561df0dbe6ca41 Mon Sep 17 00:00:00 2001 From: Sascha Weidner Date: Sat, 18 Jun 2016 20:27:23 +0200 Subject: [PATCH 4/5] Update ModuleTagListByCategory.php --- modules/ModuleTagListByCategory.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/ModuleTagListByCategory.php b/modules/ModuleTagListByCategory.php index d3137d4..a4a4c71 100644 --- a/modules/ModuleTagListByCategory.php +++ b/modules/ModuleTagListByCategory.php @@ -117,7 +117,6 @@ protected function compile() $this->import($callback[0]); $arrTagTemplates[] = $this->$callback[0]->$callback[1]($sourcetable,$tagid_cats[$sourcetable]); } - print_r($arrTagTemplates); $this->Template->other_pages = $arrTagTemplates; } break; From ad7f797459ffe4dd9534db42f1543309cafc341a Mon Sep 17 00:00:00 2001 From: Sascha Weidner Date: Sat, 18 Jun 2016 20:36:23 +0200 Subject: [PATCH 5/5] Update ModuleTagListByCategory.php Array must be merged --- modules/ModuleTagListByCategory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ModuleTagListByCategory.php b/modules/ModuleTagListByCategory.php index a4a4c71..1766afc 100644 --- a/modules/ModuleTagListByCategory.php +++ b/modules/ModuleTagListByCategory.php @@ -115,7 +115,7 @@ protected function compile() $arrTagTemplates = array(); foreach ($GLOBALS['TL_HOOKS']['tagSourceTable'] as $type => $callback) { $this->import($callback[0]); - $arrTagTemplates[] = $this->$callback[0]->$callback[1]($sourcetable,$tagid_cats[$sourcetable]); + $arrTagTemplates = array_merge($arrTagTemplates,$this->$callback[0]->$callback[1]($sourcetable,$tagid_cats[$sourcetable])); } $this->Template->other_pages = $arrTagTemplates; }