*** DTMLDocument.py.original Thu Jan 13 00:51:34 2000 --- DTMLDocument.py Thu Jan 13 00:51:34 2000 *************** *** 190,199 **** addForm=HTMLFile('documentAdd', globals()) ! def addDTMLDocument(self, id, title='', file='', REQUEST=None, submit=None): """Add a DTML Document object with the contents of file. If 'file' is empty, default document text is used. """ if type(file) is not type(''): file=file.read() if not file: file=default_dd_html ob=DTMLDocument(file, __name__=id) --- 190,205 ---- addForm=HTMLFile('documentAdd', globals()) ! def addDTMLDocument(self, id, title='', file='', REQUEST=None, submit=None, ! StDTMLTemp=None): # hack by kslee. """Add a DTML Document object with the contents of file. If 'file' is empty, default document text is used. + If StDTMLTemp is given and valid, StDTMLTemp text is used. #hack by kslee. """ + ### hack by kslee. + if StDTMLTemp: file=getattr(getattr(self, 'StDTMLRepo'), StDTMLTemp).read() + ### hack ends. + if type(file) is not type(''): file=file.read() if not file: file=default_dd_html ob=DTMLDocument(file, __name__=id) *** DTMLMethod.py.original Thu Jan 13 00:51:34 2000 --- DTMLMethod.py Thu Jan 13 00:51:34 2000 *************** *** 382,391 **** addForm=HTMLFile('methodAdd', globals()) ! def addDTMLMethod(self, id, title='', file='', REQUEST=None, submit=None): """Add a DTML Method object with the contents of file. If 'file' is empty, default document text is used. """ if type(file) is not type(''): file=file.read() if not file: file=default_dm_html ob=DTMLMethod(file, __name__=id) --- 382,396 ---- addForm=HTMLFile('methodAdd', globals()) ! def addDTMLMethod(self, id, title='', file='', REQUEST=None, submit=None, ! StDTMLTemp=None): # hack by kslee. """Add a DTML Method object with the contents of file. If 'file' is empty, default document text is used. + If StDTMLTemp is given and valid, StDTMLTemp text is used. #hack by kslee. """ + ### hack by kslee. + if StDTMLTemp: file=getattr(getattr(self, 'StDTMLRepo'), StDTMLTemp).read() + ### hack ends. if type(file) is not type(''): file=file.read() if not file: file=default_dm_html ob=DTMLMethod(file, __name__=id) *** documentAdd.dtml.original Thu Jan 13 00:51:34 2000 --- documentAdd.dtml Thu Jan 13 00:51:34 2000 *************** *** 20,25 **** --- 20,29 ---- You may create a new DTML Document using the form below. You may also choose to upload an existing html file from your local computer by clicking the Browse button. + + Or select from your site's DTML Document Templates, if the + appropriate Selection Box appears below. +