zillo32 / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Include text file content while rendering HTML page #458

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please suggest how I can include the content of a text file (stored as 
resources in vosao) in my HTML page dynamically.
I mean at runtime i know the path of the resource (suppose /file/data/abc.txt)

now i want to set $content.data=content of (/file/data/abc.txt)

or i can store my file as template somewhere and can user #parse.

Please help.

Original issue reported on code.google.com by neelam...@gmail.com on 12 Apr 2011 at 6:28

GoogleCodeExporter commented 8 years ago
See Issue 383

Original comment by kinyelo@gmail.com on 12 Apr 2011 at 7:48

GoogleCodeExporter commented 8 years ago
Thanks a lot.

Original comment by neelam...@gmail.com on 12 Apr 2011 at 8:39

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1048.

Original comment by kinyelo@gmail.com on 13 Apr 2011 at 9:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Implemented in 0.9.1

// by default uses UTF-8 encoding 

FileVO $service.getResource('/page/mypage/myfile.txt')

// you can specify encoding as second parameter 

FileVO $service.getResource('/page/mypage/myfile.txt', 'CP1251');

Original comment by kinyelo@gmail.com on 13 Apr 2011 at 10:03

GoogleCodeExporter commented 8 years ago
Thank you.it was quick and complete.

Original comment by ad...@nilambar.com on 13 Apr 2011 at 8:28