diff options
Diffstat (limited to 'fedoratheme/kindofblue/browser/viewlets.py')
-rw-r--r-- | fedoratheme/kindofblue/browser/viewlets.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fedoratheme/kindofblue/browser/viewlets.py b/fedoratheme/kindofblue/browser/viewlets.py new file mode 100644 index 0000000..1524333 --- /dev/null +++ b/fedoratheme/kindofblue/browser/viewlets.py @@ -0,0 +1,21 @@ +from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile +from plone.app.layout.viewlets.common import ViewletBase + +# Sample code for a basic viewlet (In order to use it, you'll have to): +# - Un-comment the following useable piece of code (viewlet python class). +# - Rename the vielwet template file ('browser/viewlet.pt') and edit the +# following python code accordingly. +# - Edit the class and template to make them suit your needs. +# - Make sure your viewlet is correctly registered in 'browser/configure.zcml'. +# - If you need it to appear in a specific order inside its viewlet manager, +# edit 'profiles/default/viewlets.xml' accordingly. +# - Restart Zope. +# - If you edited any file in 'profiles/default/', reinstall your package. +# - Once you're happy with your viewlet implementation, remove any related +# (unwanted) inline documentation ;-p + +#class MyViewlet(ViewletBase): +# render = ViewPageTemplateFile('viewlet.pt') +# +# def update(self): +# self.computed_value = 'any output' |