Using py exp in dtml-var tag
Dear List, i would like to pass the size attribute of a dtml-var tag as a python expression or document/folder-property. Sth like this: <dtml-var mytext size="property_of_folder">. I found several suggestions of expanding the dtml-rendering engine on zope.org, but i am not sure if there is a way one could actually do it already? Thanks, Michael ------------------------------------------------------ Michael Schulz in medias res - Freiburg, Germany
Michael Schulz - GIS Bearbeiter writes:
i would like to pass the size attribute of a dtml-var tag as a python expression or document/folder-property. Sth like this: <dtml-var mytext size="property_of_folder">. If you can live without the "...", then you can use
<dtml-var "mytext[:property_of_folder]"> If you need the "...", you must check, whether you will truncate, and add the "..." in this case. If you want to truncate at spaces, you will probably need a Python script to do it... Dieter
participants (2)
-
Dieter Maurer -
Michael Schulz - GIS Bearbeiter