fix the tabs widget
[unfold.git] / engine / composite.py
index 71f358d..cd653f8 100644 (file)
@@ -9,3 +9,16 @@ class Composite (Plugin):
     def insert (self, plugin):
         self.sons.append(plugin)
 
+    def render_env (self, request):
+        # this is designed so as to support a template like
+        # {% for son in sons %} {{ son.rendered }} ...
+        return { 'sons': 
+                 [ { 'rendered': son.render(request),
+                     'title': son.title(),
+                     'uuid': son.uuid}
+                   for son in self.sons ]}
+
+    # xxx need a way to select an active son, like e.g.
+    # Composite (active='some string')
+    # and we could then try to find that string in either title or uuid or some other place
+    # in which case the corresponding 'son' entry in render_env above would son.active=True