diff --git a/pagetree/models.py b/pagetree/models.py index 94a28e7..c38087a 100644 --- a/pagetree/models.py +++ b/pagetree/models.py @@ -701,7 +701,8 @@ def render(self, **kwargs): if hasattr(self.content_object, "template_file"): t = get_template(getattr(self.content_object, "template_file")) d = kwargs - d['block'] = self.content_object + d['pageblock'] = self.content_object + d['block'] = d['pageblock'] c = Context(d) return t.render(c) else: diff --git a/pagetree/templates/pagetree/edit_page.html b/pagetree/templates/pagetree/edit_page.html index 557b51c..0603f35 100644 --- a/pagetree/templates/pagetree/edit_page.html +++ b/pagetree/templates/pagetree/edit_page.html @@ -179,39 +179,40 @@

{{section.hierarchy.n

Drag the arrows to reorder pageblocks:

- {% for block in section.pageblock_set.all %} -
+ {% for pageblock in section.pageblock_set.all %} + {% with block=pageblock %} +
- {{block.label}} - {% rendersummary block %} + {{pageblock.label}} + {% rendersummary pageblock %}
+ {% endwith %} {% endfor %} - {% for block in section.pageblock_set.all %} -