Commit d80beca3 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Implemented convert.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13478 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1adf49d3
......@@ -120,6 +120,13 @@ class TextDocument(Document, TextContent):
if format is None:
# The default is to use ERP5 Forms to render the page
return self.view()
return self.convert(format=format)
security.declareProtected(Permissions.View, 'convert')
def convert(self, format, **kw):
"""
Convert text using portal_transforms
"""
# Accelerate rendering in Web mode
_setCacheHeaders(self, {'format' : format})
# Return the raw content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment