Liferay Resources-Importer不会向页面添加文章

时间:2017-01-17 12:52:45

标签: search liferay

我这样做sitemap.json

{
"layoutTemplateId": "1_column",
"layouts": [
    {
        "name": "Inicio",
        "title": "Início",
        "friendlyURL": "/inicio",
        "layoutTemplateId": "1_column",
        "articles": [
            "genericBlock.xml", 
            "inicio.html",
            "formularioInicio.html"
        ]

    },
    {
        "name": "Pagina Menu Lateral",
        "title": "Página Menu Lateral",
        "friendlyURL": "/pagina-menu-lateral",
        "layouts":[
                {
                "name": "Link1",
                "title": "Link 1",
                "friendlyURL": "/link1",
                "layoutTemplateId": "1_column",
                "columns": [
                    [
                    ]
                ]
                },
                {
                "name": "Link2",
                "title": "Link 2",
                "friendlyURL": "/link2",
                "layoutTemplateId": "1_column",
                "columns": [
                    [
                    ]
                ]
                },
                {
                "name": "Link3",
                "title": "Link 3",
                "friendlyURL": "/link3",
                "layoutTemplateId": "1_column",
                "columns": [
                    [
                    ]
                ]
                },
                {
                "name": "Link4",
                "title": "Link 4",
                "friendlyURL": "/link4",
                "layoutTemplateId": "1_column",
                "columns": [
                        [
                            "link4MenuLateral.html"
                        ]
                    ]
                }
            ]
    },
    {
        "name": "Pagina Texto",
        "title": "Página de Texto",
        "friendlyURL": "/pagina-de-texto",
        "layoutTemplateId": "1_column",
        "columns":[
            [
                "paginaTexto.html"
            ]
        ]
    },
    {
        "name": "Noticias",
        "title": "Notícias",
        "friendlyURL": "/noticias",
        "layoutTemplateId": "1_column",
        "columns":[
            [
                "noticias.html"
            ]
        ]
    },
    {
        "name": "Search",
        "title": "Pesquisa",
        "friendlyURL": "/search",
        "layoutTemplateId": "1_column",
        "hidden": "true"
    }
]
}

当我部署到liferay时,所有运行都很顺利,但是当我尝试使用Web内容搜索搜索该内容时,没有找到任何内容。 当我在网页内容中发布所有文章时,它会创建portlet网址,但从未找到指向网页内容的网页。

如何让资源导入程序自动发布网络内容?

进一步执行时:

JournalArticleServiceUtil.getArticlesByLayoutUuid(groupId, LayoutLocalServiceUtil.getLayouts(groupId, false).get(i).getUuid()).size()

为所有布局返回0。

如何让网站地图包含布局中的文章?

当我使用drag&添加内容时删除搜索结果。

有人面对或可能会给出一些建议吗?

1 个答案:

答案 0 :(得分:0)

请尝试这个。我不知道内容的结构(如果两者都使用相同的xml文件)。

{
"layoutTemplateId": "1_column",
"publicPages": [
    {
        "columns": [
            [
                "formularioInicio.html",
                {
                    "portletId": "56",
                    "portletPreferences": {
                        "articleId": "genericBlock.xml",
                        "groupId": "${groupId}",
                        "portletSetupShowBorders": "true",
                        "portletSetupTitle_en_US":
                            "formulario inicio",
                        "portletSetupUseCustomTitle": "true"
                    }
                },

                "inicio.html"
                {
                    "portletId": "56",
                    "portletPreferences": {
                        "articleId": "genericBlock.xml",
                        "groupId": "${groupId}",
                        "portletSetupShowBorders": "true",
                        "portletSetupTitle_en_US":
                            "inicio",
                        "portletSetupUseCustomTitle": "true"
                    }
                }
            ]
        ],
        "name": "Inicio",
        "title": "Início",
        "friendlyURL": "/inicio"
    }
]}