cancel
Showing results for 
Search instead for 
Did you mean: 

RSS feed on dashboard?

justin
Champ in-the-making
Champ in-the-making
Hi there,

I was wondering if it's possible to allow users to subscribe to the RSS feed of different spaces and the feed panel appear on "My Dashboard".

Also, for forums, is there a notify function so that when activities happen, users who posted to the forum can be notified, kind of like the Alfresco forum.

Thanks,

Justin
7 REPLIES 7

kevinr
Star Contributor
Star Contributor
Hi,

Dashboards can displays templates (examples are already provided - the My Documents dashboard is a template) and the RSS feed is just a template that outputs XML in the RSS format.

It doesn't matter what a template outputs, so why go the extra step of converting XML back into HTML - which you would need to do to create a dashlet that understood the RSS output and displayed it in a useful way - when you can just create a template that performs the same function. There already exists a template called "recent_docs.ftl"which displays the documents modified in the last 7 days (the RSS feed template is based on this one!). You could create a very simple dashlet that displays this template for a space.

Thanks,

Kevin

mabayona
Champ on-the-rise
Champ on-the-rise
Hi,

I have tried the proposed dashlet and, when selected and activated, I get the following error:

An error occurred in one of the dashlets.

    * Se ha producido un Error al procesar la plantilla 'Expression space is undefined on line 10, column 11 in alfresco/templates/recent_docs.ftl.'.

Any idea on what is wrong with the template?

I?m using v1.4RC1 and the template content is:

<#– Table of docs in a specific folder, that have been created or modified in the last week –>
<h3>Documents created or modified in the last week</h3>
<table cellpadding=2>
   <tr>
      <td></td>
      <td><b>Name</b></td>
      <td><b>Created Date</b></td>
      <td><b>Modified Date</b></td>
   </tr>
   <#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>
      <#if (dateCompare(child.properties["cm:modified"], date, 1000*60*60*24*7) == 1) || (dateCompare(child.properties["cm:created"], date, 1000*60*60*24*7) == 1)>
         <tr>
            <td><a href="/alfresco${child.url}" target="new"><img src="/alfresco${child.icon16}" border=0></a></td>
            <td><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></td>
            <td>${child.properties["cm:created"]?datetime}</td>
            <td>${child.properties["cm:modified"]?datetime}</td>
         </tr>
      </#if>
   </#list>
</table>

mabayona
Champ on-the-rise
Champ on-the-rise
Hi,

I have tried the proposed dashlet and, when selected and activated, I get the following error:

An error occurred in one of the dashlets.

    * Se ha producido un Error al procesar la plantilla 'Expression space is undefined on line 10, column 11 in alfresco/templates/recent_docs.ftl.'.

Any idea on what is wrong with the template?

I?m using v1.4RC1.

mabayona
Champ on-the-rise
Champ on-the-rise
Hi,

I have tried the proposed dashlet and, when selected and activated, I get the following error:

An error occurred in one of the dashlets.

    * Se ha producido un Error al procesar la plantilla Expression space is undefined on line 10, column 11 in alfresco/templates/recent_docs.ftl.

Any idea on what is wrong with the template?

I am using v1.4RC1.

kevinr
Star Contributor
Star Contributor
You will need to edit the template to work in the dashlet. In a dashlet there is no "current space" (the 'space' variable in the template). Since you want to display the documents in your home space, change the reference to 'space' to 'userhome':

<#list userhome.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>

Then it should work.

Thanks,

Kevin

justin
Champ in-the-making
Champ in-the-making
Hi,

Suppose I have a space that has many children and grandchildren-level spaces within it.  I want any addition of files in the children spaces be visible from the "mother space".  How can I achieve that?

Thanks,

Justin

kevinr
Star Contributor
Star Contributor
The code mentioned above show content for all spaces, including child spaces, note the XPath expression:


<#list userhome.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>

The .// part means "current node and all descendants".

Thanks,

Kevin