Skip to content
Snippets Groups Projects
Commit 45b3eb604765 authored by Katia Saurfelt's avatar Katia Saurfelt
Browse files

[boxes] do not write HTML markup for aside columns if no box content available (closes #3643330)

parent 0de68c23d372
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,5 @@ ...@@ -116,7 +116,5 @@
@monkeypatch(basetemplates.TheMainTemplate) @monkeypatch(basetemplates.TheMainTemplate)
def nav_column(self, view, boxes, context): def nav_column(self, view, boxes, context):
if boxes: if boxes:
getlayout = self._cw.vreg['components'].select html = []
self.w(u'<div id="aside-main-%s" class="col-md-3">\n' %
context)
for box in boxes: for box in boxes:
...@@ -122,6 +120,11 @@ ...@@ -122,6 +120,11 @@
for box in boxes: for box in boxes:
box.render(w=self.w, view=view) box.render(w=html.append, view=view)
self.w(u'</div>\n') if html:
# only display aside columns if html availble
self.w(u'<div id="aside-main-%s" class="col-md-3">\n' %
context)
self.w(u'\n'.join(html))
self.w(u'</div>\n')
return len(boxes) return len(boxes)
@monkeypatch(basetemplates.TheMainTemplate) @monkeypatch(basetemplates.TheMainTemplate)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment