Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 5082)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 5083)
@@ -4,5 +4,6 @@
 
 from hurry import yui
-from zope.component import getMultiAdapter
+from zope.component import getMultiAdapter, queryAdapter
+from zope.interface import Interface
 from zope.location.interfaces import ISite
 from waeup.sirp.browser.pages import (
@@ -57,5 +58,4 @@
     grok.baseclass()
     grok.context(IWAeUPObject)
-    grok.template('actionbutton')
     grok.viewletmanager(ActionBar)
     icon = 'actionicon_modify.png' # File must exist in static/
@@ -63,4 +63,23 @@
     text = 'Edit settings' # Text to display on the button
 
+    # We set the template file explicitly (instead of using
+    # ``grok.template('actionbutton')``) to stick with this template
+    # also in derived classes in other packages. If we didn't, those
+    # derived ActionButton viewlets had to provide an own template,
+    # which would not be updated automatically, when the local
+    # template ``templates/actionbutton.pt`` changes.
+    #
+    # Inheriting viewlets that wish to use their own template anyway
+    # can do so by setting their local ``grok.template(<mytemplate>)``
+    # and setting ``template`` to ``None`` for the class::
+    #
+    # class DerivedActionButton(ActionButton):
+    #   ...
+    #   grok.template('overriding_template')
+    #   template = None
+    #   ...
+    #
+    template = grok.PageTemplateFile('templates/actionbutton.pt')
+
     @property
     def alt(self):
@@ -73,5 +92,20 @@
         """Get the icon URL.
         """
-        return self.view.static[self.icon]()
+        static = self.view.static
+        if static is None or static.get(self.icon, None) is None:
+            # In derived classes defined in other modules/packages
+            # than w.s.browser, ``static`` might refer to a static dir
+            # local to the derived class' module. As we often like to
+            # get the icons from here
+            # (i.e. waeup.sirp.browser/static), we set the directory
+            # resource appropiately.
+            #
+            # XXX: The hardcoding of 'w.s.browser' should be replaced
+            #      by something smarter.
+            #
+            # TODO: notes in here should go to general documentation.
+            static = queryAdapter(
+                self.request, Interface, name='waeup.sirp.browser')
+        return static[self.icon]()
 
     @property
