<?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: Viewing Blog posts in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251081#M204211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The way to figure this out is to first find the client-side JavaScript file that is setting the initial filter. Using something like Firebug, you'll find that it is in a client-side JavaScript file called "/components/blog/postlist.js". On line 109 of that file, you'll see that there is an option called initialFilter. Later in the code, around 560, you'll see where the value set in the initialFilter gets merged with a default value. If you watch this line in the debugger, you'll see that the initialFilter option is getting set before we arrive at this code, which means we do not want to change the client-side JavaScript. Instead, we need to figure out where that option is set and override it there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, we go look at the web scripts used to make up the blog functionality. These reside in "/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/blog/". If we grep for initialFilter, we get a hit on postlist.get.html.ftl. If you take a look at that file, you'll see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;new Alfresco.BlogPostList("${args.htmlid}").setOptions(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; siteId: "${page.url.templateArgs.site!''}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerId: "${template.properties.container!'blog'}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialFilter:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterId: "${(page.url.args.filterId!'new')?js_string}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterOwner: "${(page.url.args.filterOwner!'Alfresco.BlogPostListFilter')?js_string}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterData: &amp;lt;#if page.url.args.filterData??&amp;gt;"${page.url.args.filterData?js_string}"&amp;lt;#else&amp;gt;null&amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }).setMessages(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ${messages}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; );&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;So what we want to do is change that filterId from 'new' to 'all'. It is tempting to change this file, but the right thing to do is to use Share's extension mechanism. To do that, copy the file to "/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/blog/postlist.get.html.ftl". Then, edit the file to change the filterId string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, when you restart the Share webapp, Alfresco will override its postlist.get.html.ftl view with your copy, and when you navigate to the blog page, the default filter will be All instead of Latest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jun 2011 15:40:19 GMT</pubDate>
    <dc:creator>jpotts</dc:creator>
    <dc:date>2011-06-28T15:40:19Z</dc:date>
    <item>
      <title>Viewing Blog posts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251080#M204210</link>
      <description>Hello, i have a small problem, that is probably easily resolved, but i cant find the solution myself so im asking for some direction.We are using Alfresco Community 3.4.d running on a virtual Linux machine.I'm having several blog posts that are shown in Site Blog part of the Share and they always ne</description>
      <pubDate>Tue, 28 Jun 2011 12:48:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251080#M204210</guid>
      <dc:creator>igneus</dc:creator>
      <dc:date>2011-06-28T12:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing Blog posts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251081#M204211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The way to figure this out is to first find the client-side JavaScript file that is setting the initial filter. Using something like Firebug, you'll find that it is in a client-side JavaScript file called "/components/blog/postlist.js". On line 109 of that file, you'll see that there is an option called initialFilter. Later in the code, around 560, you'll see where the value set in the initialFilter gets merged with a default value. If you watch this line in the debugger, you'll see that the initialFilter option is getting set before we arrive at this code, which means we do not want to change the client-side JavaScript. Instead, we need to figure out where that option is set and override it there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, we go look at the web scripts used to make up the blog functionality. These reside in "/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/blog/". If we grep for initialFilter, we get a hit on postlist.get.html.ftl. If you take a look at that file, you'll see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;new Alfresco.BlogPostList("${args.htmlid}").setOptions(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; siteId: "${page.url.templateArgs.site!''}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerId: "${template.properties.container!'blog'}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialFilter:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterId: "${(page.url.args.filterId!'new')?js_string}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterOwner: "${(page.url.args.filterOwner!'Alfresco.BlogPostListFilter')?js_string}",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterData: &amp;lt;#if page.url.args.filterData??&amp;gt;"${page.url.args.filterData?js_string}"&amp;lt;#else&amp;gt;null&amp;lt;/#if&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }).setMessages(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ${messages}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; );&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;So what we want to do is change that filterId from 'new' to 'all'. It is tempting to change this file, but the right thing to do is to use Share's extension mechanism. To do that, copy the file to "/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/blog/postlist.get.html.ftl". Then, edit the file to change the filterId string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, when you restart the Share webapp, Alfresco will override its postlist.get.html.ftl view with your copy, and when you navigate to the blog page, the default filter will be All instead of Latest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 15:40:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251081#M204211</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2011-06-28T15:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing Blog posts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251082#M204212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just tried it and it works like a charm! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That was one of the best and most detailed solution Jeff. Thank you very much for that! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Beer is on me next time you visit Croatia&amp;nbsp; &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This one is solved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess i can do the same with Discussions right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 09:05:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251082#M204212</guid>
      <dc:creator>igneus</dc:creator>
      <dc:date>2011-06-29T09:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing Blog posts</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251083#M204213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just to add, I managed to change the filter on Discussions also, in topiclist.get.html.ftl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 09:22:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/viewing-blog-posts/m-p/251083#M204213</guid>
      <dc:creator>igneus</dc:creator>
      <dc:date>2011-06-29T09:22:29Z</dc:date>
    </item>
  </channel>
</rss>

