9 February 2004 1 comment Zope
This blog post is 18 years old! Most likely, its content is outdated. Especially if it's technical.
For the record, this is how to include a "DOCTYPE declaration"n:http://www.seoconsultants.com/w3c/doctype.asp in Zope when you use "PageTemplates with METAL"n:http://dev.zope.org/Wikis/DevSite/Projects/ZPT/METAL%20Specification%201.0.
In your
standard template object (e.g. StandardLook.zpt):
<metal:block define-macro="standard">
<?xml version="1.0"?>
<metal:block define-slot="doctype">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</metal:block>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
...
</html>
</metal:block>
This site is not XHTML valid (yet), but W3C has the validator to use.
- Previous:
- Dan Heller's Photos of Italy 8 February 2004
- Next:
- Breaking usability principles for usability 10 February 2004
- Related by category:
- 'Cache-Control' or Expires 16 September 2005 Zope
- Mocking a Python standard library 14 March 2008 Zope
- rfc822() vs. rfc1123_date() 16 August 2007 Zope
- Sending HTML emails in Zope 26 October 2006 Zope
- To all Zope developers: Does this sound familiar? 8 March 2011 Zope
- Related by keyword:
- Interview with Varg Vikernes 1 July 2008
- Orphaned Land - Jewish Muslim Metal 8 December 2009
- Kalle Kappner - Opeth and Pain of Salvation piano tribute 19 August 2008
- Tip: Printer friendly pages with Page Templates in Zope 24 March 2008
- More crappy album covers 6 August 2006
Thanks for a great bit of advice! I find that some parsers (notably W3C's validator) get a little confused by the empty 1st line that this results in. I fixed it by doing
<metal:block define-macro="foobar"
><?xml version="1.0" encoding="utf-8"?>
...etc
instead -- no newline between the end of metal:block and the beginning of the xml processing directive.