AnsweredAssumed Answered

RSS-Feed inklusive Version und Kategorien

Question asked by dmc on Mar 27, 2008
Ich müßte meinen RSS-Feed mit weiteren Angaben aus den Metadaten-Eigenschaften ausstatten, z.B. Version des Dokuments und Kategorien des Dokuments. Wie kann ich das bewerkstelligen? Wie kann ich auf diese document.properties via Freemarker-Template zugreifen?

Hier mein RSS-Template:


<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
   <channel>
      <title>Firmanname QMS-Handbuch RSS-Feed</title>
      <copyright>Copyright © Firma</copyright>
      <#assign hostname="http://servername:8080/alfresco">
      <#assign spaceref="${hostname}/navigate/browse/${space.nodeRef.storeRef.protocol}/${space.nodeRef.storeRef.identifier}/${space.nodeRef.id}">
      <#assign datetimeformat="EEE, dd MMM yyyy HH:mm:ss zzz">
      <link>${spaceref}</link>
      <description>Aktualisierte Inhalte im '${space.name}'</description>
      <language>de-de</language>
      <lastBuildDate>${date?string(datetimeformat)}</lastBuildDate>
      <pubDate>${date?string(datetimeformat)}</pubDate>
      <ttl>120</ttl>
      <generator>Alfresco 2.1.1</generator>
      <image>
         <title>${space.name}</title>
         <width>64</width>
         <height>64</height>
         <link>${spaceref}</link>
         <url>${hostname}${space.icon32}</url>
      </image>
      <#assign weekms=1000*60*60*24*7>
      <#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>
      <#if (dateCompare(child.properties["cm:modified"], date, weekms) == 1) || (dateCompare(child.properties["cm:created"], date, weekms) == 1)>
      <item>
         <title>${child.properties.name}</title>
         <link>${hostname}${child.url}</link>
         <description>
            ${"<a href='${hostname}${child.url}'>"?xml}${child.properties.name}${"</a>"?xml}
            <#if child.properties["cm:description"]?exists && child.properties["cm:description"] != "">
               ${child.properties["cm:description"]}
            </#if>
           <modifier>geändert von ${child.properties["cm:modifier"]}</modifier>
       </description>
            <pubDate>${child.properties["cm:modified"]?string(datetimeformat)}</pubDate>
            <guid isPermaLink="false">${hostname}${child.url}</guid>
      </item>
      </#if>
      </#list>
   </channel>
</rss>

Outcomes