From e2ac85ed17a324850104dd6933d2c0d1a9a4bf37 Mon Sep 17 00:00:00 2001 From: Michael Aerni Date: Wed, 9 Oct 2024 12:26:38 -0400 Subject: [PATCH] [5.x] Add `{{ taxonomy:count }}` tag (#10923) --- src/Tags/Taxonomy/Taxonomy.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Tags/Taxonomy/Taxonomy.php b/src/Tags/Taxonomy/Taxonomy.php index cc415e7232..cd93171053 100644 --- a/src/Tags/Taxonomy/Taxonomy.php +++ b/src/Tags/Taxonomy/Taxonomy.php @@ -31,6 +31,14 @@ public function index() return $this->output($terms); } + /** + * {{ taxonomy:count from="" }} + */ + public function count() + { + return $this->terms()->count(); + } + protected function terms() { return new Terms($this->params);