<?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: RSS Feed Question in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/rss-feed-question/m-p/292879#M246009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you may know, this file is formatted with freemarker. And your articleList is a freemarker sequence.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So what you need to do is restrict this sequence to the X first elements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To do so, please have a look at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/18458417/get-sub-list-from-a-list-in-freemarker" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/18458417/get-sub-list-from-a-list-in-freemarker&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need it to be modifiable through a parameter, you can just retrieve parameters with the "args" root object&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so your webscript would just need a one-line change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#list (((articleList?sort_by("articledate"))?reverse)?chunk((args["maxEntries"]!"20")?number))?first as i&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I added parentheses for clarity. AndAssumed a default value of 20 entries when the maxEntries parameter is not specified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't test it so if it causes any syntax error please come back&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jan 2014 15:53:02 GMT</pubDate>
    <dc:creator>scouil</dc:creator>
    <dc:date>2014-01-28T15:53:02Z</dc:date>
    <item>
      <title>RSS Feed Question</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rss-feed-question/m-p/292878#M246008</link>
      <description>RSS Feed Question - How do you define number of posts displayed on a RSS feed? The FTL file code we are using is below:FYI: I'm not the developer. This was created by a IT contractor who helped us set-up our Alfresco CMS.&amp;lt;#ftl ns_prefixes={"news", "http://www.webbynews.ca/news"}&amp;gt;&amp;lt;#assign ne</description>
      <pubDate>Tue, 21 Jan 2014 18:42:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rss-feed-question/m-p/292878#M246008</guid>
      <dc:creator>andream</dc:creator>
      <dc:date>2014-01-21T18:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: RSS Feed Question</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rss-feed-question/m-p/292879#M246009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you may know, this file is formatted with freemarker. And your articleList is a freemarker sequence.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So what you need to do is restrict this sequence to the X first elements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To do so, please have a look at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/18458417/get-sub-list-from-a-list-in-freemarker" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/18458417/get-sub-list-from-a-list-in-freemarker&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need it to be modifiable through a parameter, you can just retrieve parameters with the "args" root object&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so your webscript would just need a one-line change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;#list (((articleList?sort_by("articledate"))?reverse)?chunk((args["maxEntries"]!"20")?number))?first as i&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I added parentheses for clarity. AndAssumed a default value of 20 entries when the maxEntries parameter is not specified&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't test it so if it causes any syntax error please come back&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:53:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rss-feed-question/m-p/292879#M246009</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2014-01-28T15:53:02Z</dc:date>
    </item>
  </channel>
</rss>

