6 Apr
2000
6 Apr
'00
6:07 p.m.
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