将速度转换为freemarker但不起作用

问题描述

我为网络内容创建了结构和模板,以通过Asset Publisher发布文章。

“结构源和视图”如下所示:

{
    "availableLanguageIds": [
        "en_US"
    ],"defaultLanguageId": "en_US","fields": [
        {
            "label": {
                "en_US": " File Title "
            },"predefinedValue": {
                "en_US": "  "
            },"style": {
                "en_US": ""
            },"tip": {
                "en_US": "  "
            },"dataType": "string","indexType": "keyword","localizable": true,"name": "File_Title","readOnly": false,"repeatable": true,"required": true,"showLabel": true,"type": "text","nestedFields": [
                {
                    "label": {
                        "en_US": " Select File "
                    },"predefinedValue": {
                        "en_US": "  "
                    },"style": {
                        "en_US": ""
                    },"tip": {
                        "en_US": " Browse the file from  NEWS folder present under Disney "
                    },"dataType": "document-library","fieldNamespace": "ddm","name": "Select_File","repeatable": false,"type": "ddm-documentlibrary"
                }
            ]
        }
    ]
}

查看:

enter image description here

现在,标记为上述结构的模板源在Liferay 6.2中以速度语言运行良好,如下所示:

#if (!$File_Title.getSiblings().isEmpty())
    #foreach ($cur_File_Title in $File_Title.getSiblings())
        <h3>
         <a href="$cur_File_Title.Select_File.getData()" target="_blank">$cur_File_Title.getData()</a>
        </h3>
        #end
#end

我将应用程序迁移到DXP 7.2,并在应用程序中使用了相同的结构和模板(选择了相同的.vm模板语言),资产发布者中的结构视图不允许我在文本中输入任何值框。

enter image description here

因此,我尝试将Velocity代码迁移到freemarker语言,如下所示。

<#if File_Title.siblings?size !=0>
    <#list File_Title.siblings as cur_File_Title>
        <h3>
            <a href="${cur_File_Title.Select_File.data}" target="_blank">${cur_File_Title.data}</a>
        </h3>
    </#list>
</#if>

现在,结构视图允许我输入值,但是当我尝试单击已发布的文章时,附件未显示。

enter image description here

下面是屏幕,当前在6.2中的显示方式,锚链接具有用于下载附件的文档媒体URL。

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...