AnsweredAssumed Answered

Get Related Articles of content in web script for atom feed

Question asked by maithili on Mar 6, 2012
Latest reply on Mar 9, 2012 by maithili
Hello,

The View Details of content shows the Related Articles in the Properties section, however if we loop through the properties object the related articles are not listed.
How do we get the document ids of the Related Articles of a document in a web script for an atom feed?
I used the following code from the online documentation.


        <#if !child.isContainer>
            <#– Get a list of all the property names for the document –>
<#assign props = child.properties?keys>
<#list props as t>
    <#– If the property exists –>
    <#if child.properties[t]?exists>
       <#– If it is a date, format it accordingly–>
       <#if child.properties[t]?is_date>
       <dateprop>${t} = ${child.properties[t]?date}</dateprop>
      
       <#– If it is a boolean, format it accordingly–>
       <#elseif child.properties[t]?is_boolean>
       <boolprop>${t} = ${child.properties[t]?string("yes", "no")}</boolprop>
      
       <#– Otherwise treat it as a string –>
       <#else>
       <otherprop>${t} = ${child.properties[t]}</otherprop>
       </#if>
    </#if>

Outcomes