Is there a way Zope can recognize line breaks? Essentially for this reason: <dtml-if (there's a line break or blank line)> <p> </dtml-if> So when uploading a text document Zope will automatically insert <p> tags when neccessary. Thanks in advance. ************************* Tom Scheidt www.falsemirror.com tom@falsemirror.com *************************
Hi, Tom Tom Scheidt wrote:
Is there a way Zope can recognize line breaks?
If you just want to display it properly, <dtml-var theText fmt=newline_to_br> will work fine. It inserts <br> tags instead of <p> tags, but visually it is almost the same. If you really need to get fancy, you will have to do something pythonish on the lines of <dtml-in "_.string.split(theText,'\n')"> <dtml-var sequence-item><p> </dtml-in>
Essentially for this reason:
<dtml-if (there's a line break or blank line)> <p> </dtml-if>
So when uploading a text document Zope will automatically insert <p> tags when neccessary.
hth, -- Jim Washington Center for Assessment, Evaluation and Educational Programming Department of Teaching and Learning, Virginia Tech
participants (2)
-
Jim Washington -
Tom Scheidt