0

I created an alfresco webscript and output file as xxx.get.text.ftl file. In the output file(xxx.get.text.ftl), I am trying to create text version of newsletter. But I am not able to get text lines with line break. if I put

AAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBB

I am getting as

AAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBB

Any Idea what could be the reason?

EDIT:

in my case i have page, template-instance,template and region. It turns out that when I call web script that fill the region it displays as text.But if I call full url like "www.xxx.com/news/my-news" it includes other components like template, page etc. and it turns the output to html. Because output for template or page is hard coded to text/html in surf.

smile
  • 498
  • 7
  • 18

2 Answers2

1

If is text try to add

\n

at the end of line

DGA
  • 258
  • 3
  • 15
0

Whitespace and especially new-line handling is always an issue for template languages because it is not clear whether the remove the new line after a closing template-tag or not. See the freemarker documentation for discussion: http://freemarker.org/docs/dgui_misc_whitespace.html

I think you just have to add an extra newline.

  • by saying "I think you just have to add an extra newline." you mean add empty new line? if so, it is not working – smile Jul 16 '13 at 16:14
  • Please post your freemarker source. Btw if you check the output with the browser verify that the response is delivered with content-Type text/plain and not text/html. – Lothar Märkle Jul 17 '13 at 16:47
  • Lothar,thanks for the hint.I add new comments to my question. – smile Jul 17 '13 at 21:39