From 2f8d6cccfa48a65ae8eb77be9af0e4eff53361d4 Mon Sep 17 00:00:00 2001 From: Ben Walch Date: Tue, 22 Mar 2022 11:16:52 +0100 Subject: [PATCH] template improvements for aggregation filter (#10) --- UPGRADE.md | 3 +++ .../OutputChannel/Filter/AggregationFilter.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index 724e162..c117daf 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,8 @@ # Upgrade Notes +### 2.0.2 +- [FEATURE] template improvements for aggreagtion filter [#10](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-elasticsearch/issues/10) + ### 2.0.1 - [BUGFIX] Fix field for filter's term query [#7](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-elasticsearch/issues/7) diff --git a/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php b/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php index f0c7ce6..010230c 100644 --- a/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php +++ b/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php @@ -96,7 +96,8 @@ public function buildViewVars(RawResultInterface $rawResult, $filterValues, $que $response = $rawResult->getParameter('fullDatabaseResponse'); $viewVars = [ - 'template' => sprintf('%s/aggregation.html.twig', self::VIEW_TEMPLATE_PATH), + 'name' => $this->name, + 'template' => [sprintf('%s/%s.html.twig', self::VIEW_TEMPLATE_PATH, $this->name), sprintf('%s/aggregation.html.twig', self::VIEW_TEMPLATE_PATH)], 'label' => $this->options['label'], 'multiple' => $this->options['multiple'], 'values' => [],