|
Revision 19076, 414 bytes
(checked in by sfermigier, 6 years ago)
|
Initial revision
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
from Products.PortalTransforms.interfaces import itransform |
|---|
| 2 |
|
|---|
| 3 |
class image_to_html: |
|---|
| 4 |
__implements__ = itransform |
|---|
| 5 |
|
|---|
| 6 |
__name__ = "image_to_html" |
|---|
| 7 |
inputs = ('image/*', ) |
|---|
| 8 |
output = 'text/html' |
|---|
| 9 |
|
|---|
| 10 |
def name(self): |
|---|
| 11 |
return self.__name__ |
|---|
| 12 |
|
|---|
| 13 |
def convert(self, data, cache, **kwargs): |
|---|
| 14 |
imageName = kwargs.get("image") |
|---|
| 15 |
cache.setData('<img src="%s"/>' %imageName) |
|---|
| 16 |
return cache |
|---|