diff --git a/agaric/templates/layout/page.html.twig b/agaric/templates/layout/page.html.twig
index 968138e..fd55d2b 100644
--- a/agaric/templates/layout/page.html.twig
+++ b/agaric/templates/layout/page.html.twig
@@ -80,7 +80,11 @@
{# Main section #}
{# Only group the main content into one wrapping element if it needs to be
separated from a sidebar or two. #}
+{% set has_columns=false %}
{% if page.sidebar_first or page.sidebar_second %}
+ {% set has_columns=true %}
+{% endif %}
+{% if has_columns %}
{% endif %}
@@ -96,13 +100,17 @@
set page = page|merge({
'content_attributes': create_attribute().addClass([
'main-content',
- 'column',
]),
})
%}
{% endif %}
+ {% if not has_columns %}
+ {# TODO figure out how to move the removeClass here
+ without a Twig parse error:
+ set page.content_attributes = page.content_attributes|removeClass('column') #}
+ {% endif %}
{# Main content #}
-