diff roundup/cgi/templating.py @ 1061:7f9b942128a3

nicer page title
author Richard Jones <richard@users.sourceforge.net>
date Fri, 06 Sep 2002 05:33:09 +0000
parents a0c7df67dd9c
children 0f9aa62917bd
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Fri Sep 06 05:05:18 2002 +0000
+++ b/roundup/cgi/templating.py	Fri Sep 06 05:33:09 2002 +0000
@@ -1075,6 +1075,19 @@
         if kwargs.has_key('columns'):
             self.show = ShowDict(self.columns)
 
+    def description(self):
+        ''' Return a description of the request - handle for the page title.
+        '''
+        s = [self.client.db.config.INSTANCE_NAME]
+        if self.classname:
+            if self.client.nodeid:
+                s.append('- %s%s'%(self.classname, self.client.nodeid))
+            else:
+                s.append('- index of '+self.classname)
+        else:
+            s.append('- home')
+        return ' '.join(s)
+
     def __str__(self):
         d = {}
         d.update(self.__dict__)

Roundup Issue Tracker: http://roundup-tracker.org/