<#ftl output_format="JSON">
{<#assign attribute=content.attribute/>
    <@cms.category id=content.categoryId>
        <#assign category=object/>
    </@cms.category>
    "id":"${content.id}",
    "cover":"${content.cover!}",
    "title":"${content.title!}",
    "url":"${content.url!}",
    "description":"${content.description!}",
    "categoryId":"${content.categoryId!}",
    "categoryTitle":"${category.name!}",
    "categoryUrl":"${category.url!}",
    "editor":"${content.editor!}",
    "publishDate":"${content.publishDate?string}",
    "text":"${(attribute.text?html)!}",
    "sourceUrl":"${(attribute.sourceUrl)!}",
    "source":"${(attribute.source)!}"<#if content.hasFiles>
    ,"files":[<@cms.contentFileList contentId=content.id fileTypes='video,audio,other'><#list page.list as file>
        {"filePath":"${(file.filePath)!}}"<#sep>,</#list></@cms.contentFileList>
    ]</#if><#if content.hasImages>
    ,"images":[<@cms.contentFileList contentId=content.id fileTypes='image'><#list page.list as file>
        {"filePath":"${(file.filePath)!}}"<#sep>,</#list></@cms.contentFileList>
    ]</#if>
}