diff --git a/templates/bricks/overview.html.twig b/templates/bricks/overview.html.twig
index 5a0072e..907da4f 100644
--- a/templates/bricks/overview.html.twig
+++ b/templates/bricks/overview.html.twig
@@ -22,39 +22,20 @@
{{ brick.description|trans }} |
{{ brick.template }} |
- {% set published_pages = brick.pages|filter(page => page.published) %}
- {% set unpublished_pages = brick.pages|filter(page => not page.published) %}
+ {% embed "@NeustaPimcoreAreabrickConfig/bricks/pages_accordion.html.twig" with {
+ title: 'neusta_pimcore_areabrick_config.areabricks.overview.table.published_pages'|trans,
+ pages: brick.pages|filter(page => page.published),
+ } only %}
+ {% block page %}
+ {{ parent() }} (Frontend)
+ {% endblock %}
+ {% endembed %}
- {% if published_pages is not empty %}
-
- {{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.published_pages'|trans }}
-
-
- {% endif %}
-
- {% if unpublished_pages is not empty %}
-
- {{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.unpublished_pages'|trans }}
-
-
- {% endif %}
+ {% embed "@NeustaPimcoreAreabrickConfig/bricks/pages_accordion.html.twig" with {
+ title: 'neusta_pimcore_areabrick_config.areabricks.overview.table.unpublished_pages'|trans,
+ pages: brick.pages|filter(page => not page.published),
+ } only %}
+ {% endembed %}
|
{% if hasAdditionalProperties %}
diff --git a/templates/bricks/pages_accordion.html.twig b/templates/bricks/pages_accordion.html.twig
new file mode 100644
index 0000000..d058127
--- /dev/null
+++ b/templates/bricks/pages_accordion.html.twig
@@ -0,0 +1,14 @@
+{% if pages is not empty %}
+
+ {{ title }} ({{ pages|length }})
+
+ {% for page in pages %}
+ -
+ {% block page %}
+ {{ page.url }}
+ {% endblock %}
+
+ {% endfor %}
+
+
+{% endif %}
|