[CMF-checkins] CVS: CMF - CMFWikiPage.py:1.9
klm@serenade.digicool.com
klm@serenade.digicool.com
Fri, 8 Jun 2001 11:34:34 -0400
Update of /cvs-repository/CMF/CMFWiki
In directory serenade:/usr/local/dc/ZopeCom/Products/CMFWiki
Modified Files:
CMFWikiPage.py
Log Message:
CMFWikiFolder.index_html(): Added so that the view of the folder
automatically redirects to the FrontPage, if it exists.
--- Updated File CMFWikiPage.py in package CMF --
--- CMFWikiPage.py 2001/06/06 21:52:39 1.8
+++ CMFWikiPage.py 2001/06/08 15:34:33 1.9
@@ -1859,6 +1859,15 @@
if find(typ, 'text') != -1:
return makeCMFWikiPage(name, '', body)
+ def index_html(self):
+ """Redirects to FrontPage, if any, else does acquired index_html."""
+ if hasattr(self, 'FrontPage'):
+ response = self.REQUEST.RESPONSE
+ return response.redirect(self['FrontPage'].absolute_url())
+ else:
+ return apply(getattr(self.aq_parent, 'index_html'),
+ (self, self.REQUEST))
+
def makeCMFWikiPage(id, title, file):
ob = CMFWikiPage(source_string=file, __name__=id)
ob.title = title