Wrapping zope header/footer around LocalFS html objects
Hello, Today I installed the LocalFS-product and would really like to use it to wrap/zopify (local) html-files on a Zope-site. That is: see a HTML-file with the Zope standard_html_header and standard_html_footer attached. I read the LocalFS-FAQ at http://www.zope.org/Members/jfarr/HowTo/DTML_with_LocalFS and tried the following dtml-document: <dtml-var standard_html_header> <dtml-var "localfsdir['somefile.html'].data"> <dtml-var standard_html_footer> Unfortuately it doesn't work. Can anybody tell me why? Furthermore, I really would like to be able to render a lot of HTML-files this way (and extract the TITLE and BODY tags if possible). Did anybody do this before? I found a bit of Python code that should be able to extract the body-tag, but I am clueless how to get it to work using LocalFS. page = <<somehowreferencethelocalfsobject>>.data regex = re.compile(r'<body.*?>(.*?)</body>', re.I | re.M | re.S) result = regex.search(page) if result: return result.group(1) else return "no body tag found" Any help would be appreciated, Pieter Biemond PS I also tried using DocBrowser, but can't get it do to what I want either.
I think you might use the approach given in <http://www.zope.org/Members/unfo/howto_wrapper>. I haven't tried it myself, yet. On Fri, Mar 02, 2001 at 07:20:06PM +0100, Pieter Biemond wrote:
Today I installed the LocalFS-product and would really like to use it to wrap/zopify (local) html-files on a Zope-site. That is: see a HTML-file with the Zope standard_html_header and standard_html_footer attached.
-- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA
participants (2)
-
Fred Yankowski -
Pieter Biemond