The Dublin Core metadata element set
is a standard for cross-domain information resource description.
|
||
Element | Description | Value |
---|---|---|
Identifier | resource ID | http://old.zope.org/Members/peterbe/update_staticpage |
Title | resource name | Update Static page |
Description | resource summary | A humble script that opens your webpage and sucks in parts of it and saves the HTML into a DTML Document. The id of the DTML Document will be the page name of the URL +'_static'. So, if you open /web/doc/index.html the id of the DTML Document will be 'index.html_static'. Be careful not to request URLs like: www.server.com/. Use instead www.server.com/index_html to be explicit. Then, to use it in DTML for example you do this:: <html> <dtml-if "_.has_key('index_html_static') and REQUEST.QUERYSTRING==''"> <dtml-var index_html_static> <dtml-else> <!--DYNAMIC-CONTENT--> <dtml-var expensive_resource_heavy_looper> <!--/DYNAMIC-CONTENT--> </dtml-if> </html> To create the static DTML Document, you first need to create an External Method Id: update_staticpage, modulename: update_staticpage, functionname: update_staticpage Here's how:: context.update_staticpage(context.web.doc.index_html.absolute_url()) or:: context.update_staticpage(context.web.doc.index_html.absolute_url(), container=context.somefolder) Alternativly in DTML:: <dtml-call "update_staticpage(web.doc.index_html.absolute_url())"> This can be useful to not have to write a cronjob: <dtml-if "index_html_static.bobobase_modification_time() < ZopeTime()-1"> <dtml-call "update_staticpage(web.doc.index_html.absolute_url())"> </dtml-if> This is a very untested and simple script. It's idea is simple and anybody is free to do whatever they want and need with it. |
Creator | resource creator | ZopeOrgSite |
Date | default date | 2001-08-31 04:35:32 |
Format | resource format | text/html |
Type | resource type | Software Package |
Subject | resource keywords | Content Object |
Contributors | resource collaborators | |
Language | resource language | |
Publisher | resource publisher | No publisher |
Rights | resource copyright | |
|
||
Element | Description | Value |
CreationDate | date resource created | 2001-08-31 04:35:32 |
ModificationDate | date resource last modified | 2001-08-31 04:35:32 |
EffectiveDate | date resource becomes effective | None |
ExpirationDate | date resource expires | None |
Backlinks:
via
Google
/
Technorati
RDF:
view RDF data