Skip to content

Commit 0ca3211

Browse files
author
Richard Jones
committed
nicer page title
1 parent 0685c37 commit 0ca3211

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

TODO.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ pending web: have roundup.cgi pick up instance config from the environment
4949
pending web: UNIX init.d script for roundup-server
5050
pending web: modify cgitb to handle PageTemplate errors better (see how
5151
Zope handles __traceback_supplement__ and __traceback_info__)
52-
pending web: title is stoopid
5352
pending web: rewritten documentation (can come after the beta though so stuff
5453
is settled) ... including relevant file names in customisation doc
5554

roundup/cgi/templating.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,19 @@ def update(self, kwargs):
10751075
if kwargs.has_key('columns'):
10761076
self.show = ShowDict(self.columns)
10771077

1078+
def description(self):
1079+
''' Return a description of the request - handle for the page title.
1080+
'''
1081+
s = [self.client.db.config.INSTANCE_NAME]
1082+
if self.classname:
1083+
if self.client.nodeid:
1084+
s.append('- %s%s'%(self.classname, self.client.nodeid))
1085+
else:
1086+
s.append('- index of '+self.classname)
1087+
else:
1088+
s.append('- home')
1089+
return ' '.join(s)
1090+
10781091
def __str__(self):
10791092
d = {}
10801093
d.update(self.__dict__)

roundup/templates/classic/html/page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<html tal:define="title string:${db/config/INSTANCE_NAME} - ${request/classname}">
1+
<html tal:define="title request/description">
22
<head>
33
<title tal:content="title">title goes here</title>
44

0 commit comments

Comments
 (0)