User Specifies dtml template
hi, How can I create a user defined dtml document? What I want to do is to have an option to create 'toms dtml document', this will contain: <dtml-var standard_html_header> <dtml-var header> <dtml-var header-about> <!-- Content starts here --> <!-- Content ends here --> <dtml-var footer> <dtml-var standard_html_footer> instead of the standard: <dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <p> This is the <dtml-var id> Document. </p> <dtml-var standard_html_footer> how can I do this? is this possible? thanks in advance for any feedback, cheers, Tom. -- ----------------------------------------------------------------------- Tom Freeman Industrial Placement NISS, Eduserv Tel: 01225 323789 Fax: 01225 826177 Web: http://www.niss.ac.uk
One simple way is to edit the source file for DTML Document, its hardcoded in /lib/python/OFS/DTMLDocument.py... default_dd_html="""<dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <p> This is the <dtml-var id> Document. </p> <dtml-var standard_html_footer>""" -- Andy McKay. ----- Original Message ----- From: "Tom Freeman" <Tom.Freeman@niss.ac.uk> To: <zope@zope.org> Sent: Wednesday, February 07, 2001 7:00 AM Subject: [Zope] User Specifies dtml template
hi,
How can I create a user defined dtml document? What I want to do is to have an option to create 'toms dtml document', this will contain:
<dtml-var standard_html_header> <dtml-var header> <dtml-var header-about>
<!-- Content starts here -->
<!-- Content ends here -->
<dtml-var footer> <dtml-var standard_html_footer>
instead of the standard:
<dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <p> This is the <dtml-var id> Document. </p> <dtml-var standard_html_footer>
how can I do this? is this possible?
thanks in advance for any feedback, cheers, Tom.
-- ----------------------------------------------------------------------- Tom Freeman Industrial Placement NISS, Eduserv Tel: 01225 323789 Fax: 01225 826177 Web: http://www.niss.ac.uk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Wed, Feb 07, 2001 at 03:00:00PM +0000, Tom Freeman wrote:
hi,
How can I create a user defined dtml document?
[ SNIP ]
how can I do this? is this possible?
thanks in advance for any feedback, cheers, Tom.
I've hacked up a simple product to build objects from templates, it's available on zope.org: http://www.zope.org/Members/lupex/Templates It uses Zope cut&paste facilities to make a copy of the chosen template - which can be any object which is inside a Repository object in the current acquisition path, multiple repositories are supported. I've not made it public as the current release has a major fault: the object Id cannot be set during object creation, you'll have to rename it manually. This product works only with Zope v2.3.0, however porting it to previous releases should be trivial (after all, this product IS trivial). -- Roberto Lupi
participants (3)
-
Andy McKay -
Roberto Lupi -
Tom Freeman