class documentation
class Exportable(_filtermanager.FilterItem): (source)
Mixin that provides XML, HTML, and archive export helpers.
| Method | export |
Download configured remote resources and relink them locally. |
| Method | export |
Export auxiliary resources required by an archive export. |
| Method | get |
Render all filtered child nodes as XML fragments. |
| Method | get |
Render the current object as its custom XML fragment. |
| Method | manage |
Export the current object in one of the configured formats. |
| Method | recurse_download |
Recursively render and store HTML pages for a content subtree. |
| Method | to |
Render the current object as localized standalone HTML. |
| Method | to |
Render the current object tree as an XML export document. |
| Method | to |
Build a ZIP archive containing localized HTML export pages. |
| Method | to |
Build a ZIP archive containing the XML export and resources. |
| Class Variable | security |
Undocumented |
Download configured remote resources and relink them locally.
| Parameters | |
| obj:OFS.SimpleItem.Item | Content object whose HTML is being exported. |
| html:str | Rendered markup. |
| path:str | Directory receiving downloaded resources. |
| REQUEST:ZPublisher.HTTPRequest | Current request. |
| Returns | |
| str | Markup with localized external resource links. |
def exportRessources(self, tempfolder, REQUEST, from_content=True, from_zms=False, from_home=False):
(source)
¶
Export auxiliary resources required by an archive export.
| Parameters | |
| tempfolder:str | Temporary export directory. |
| REQUEST:ZPublisher.HTTPRequest | Current request. |
| from | Export resources referenced by content. |
| from | Export shared ZMS product resources. |
| from | Export resources from the site root. |
| Returns | |
| list | Paths of exported resources. |
Export the current object in one of the configured formats.
| Parameters | |
| export | Requested export format id. |
| lang:str | Active language. |
| REQUEST:ZPublisher.HTTPRequest | Current request. |
| RESPONSE:ZPublisher.HTTPResponse | Current response. |
| Returns | |
| str or bytes | Export payload when downloading directly. |
Recursively render and store HTML pages for a content subtree.
| Parameters | |
| obj:OFS.SimpleItem.Item | Root object of the subtree. |
| path:str | Destination directory. |
| lang:str | Active export language. |
| REQUEST:ZPublisher.HTTPRequest | Current request. |
Render the current object as localized standalone HTML.
| Parameters | |
| REQUEST:ZPublisher.HTTPRequest | Current request. |
| deep:bool | Include child content recursively. |
| Returns | |
| str or bytes | Exportable HTML or XHTML markup. |
Render the current object tree as an XML export document.
| Parameters | |
| REQUEST:ZPublisher.HTTPRequest | Request used to resolve export context. |
| deep:bool | Include child nodes recursively. |
| data2hex:bool | Hex-encode binary data values. |
| multilang:bool | Include all language variants. |
| Returns | |
| str | Serialized XML export. |
Build a ZIP archive containing localized HTML export pages.
| Parameters | |
| REQUEST:ZPublisher.HTTPRequest | Current request. |
| get | Return archive bytes instead of a file path. |
| Returns | |
| str or bytes | ZIP archive payload or path. |