<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can I read txt file with ftl? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/can-i-read-txt-file-with-ftl/m-p/171193#M124458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Freemarker doesn't natively include any mechanisms for reading data - being a pure templating language it expects the template to be passed all of the data that it needs in order to do its job (see &lt;/SPAN&gt;&lt;A href="http://freemarker.org/docs/dgui_quickstart_basics.html" rel="nofollow noopener noreferrer"&gt;http://freemarker.org/docs/dgui_quickstart_basics.html&lt;/A&gt;&lt;SPAN&gt; for background on why Freemarker was designed this way).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the context of Alfresco Web Scripts, this means that any data that your Freemarker template requires must be provided by the controller of the Web Script (either the Javascript script or Java class, depending on how the Web Script was implemented).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for the use case you describe,&amp;nbsp; the text file would be retrieved by the Web Script controller (JS or Java) and its contents added to the special "model" variable as a new property, thereby making it available to the Freemarker template for further markup.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 17:35:34 GMT</pubDate>
    <dc:creator>pmonks</dc:creator>
    <dc:date>2008-02-29T17:35:34Z</dc:date>
    <item>
      <title>Can I read txt file with ftl?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-i-read-txt-file-with-ftl/m-p/171192#M124457</link>
      <description>Is there a way to read file content with ftl?I need to read txt file published on the internet.E.g. http://www.server.com/mydoc.txtI would like to display content of this file within my template. Anybody?</description>
      <pubDate>Fri, 29 Feb 2008 12:55:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-i-read-txt-file-with-ftl/m-p/171192#M124457</guid>
      <dc:creator>msvoren</dc:creator>
      <dc:date>2008-02-29T12:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I read txt file with ftl?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-i-read-txt-file-with-ftl/m-p/171193#M124458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Freemarker doesn't natively include any mechanisms for reading data - being a pure templating language it expects the template to be passed all of the data that it needs in order to do its job (see &lt;/SPAN&gt;&lt;A href="http://freemarker.org/docs/dgui_quickstart_basics.html" rel="nofollow noopener noreferrer"&gt;http://freemarker.org/docs/dgui_quickstart_basics.html&lt;/A&gt;&lt;SPAN&gt; for background on why Freemarker was designed this way).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the context of Alfresco Web Scripts, this means that any data that your Freemarker template requires must be provided by the controller of the Web Script (either the Javascript script or Java class, depending on how the Web Script was implemented).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for the use case you describe,&amp;nbsp; the text file would be retrieved by the Web Script controller (JS or Java) and its contents added to the special "model" variable as a new property, thereby making it available to the Freemarker template for further markup.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 17:35:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-i-read-txt-file-with-ftl/m-p/171193#M124458</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-02-29T17:35:34Z</dc:date>
    </item>
  </channel>
</rss>

