plugin's title is optional
[myslice.git] / unfold / plugin.py
index ddba40b..7ee79af 100644 (file)
@@ -68,11 +68,12 @@ class Plugin:
     def __init__ (self, page, title=None, domid=None,
                   visible=True, togglable=None, toggled=None, **settings):
         self.page = page
-        self.title=title
         # callers can provide their domid for css'ing 
         if not domid: domid=Plugin.newdomid()
         self.domid=domid
+        # title is shown when togglable
         if not title: title="Plugin title for %s"%domid
+        self.title=title
         self.classname=self._py_classname()
         self.plugin_classname=self._js_classname()
         self.visible=visible