简体   繁体   English

将Web liferay内容嵌入现有的liferay Web内容中

[英]Embed web liferay content within existing liferay web content

I'm trying to print a web content from inside another web content in Liferay 5.2.3. 我正在尝试从Liferay 5.2.3中的另一个Web内容中打印Web内容。 Following the issue How to embed WebContent in Liferay i've tried: 在尝试如何将WebContent嵌入Liferay中之后,我尝试了以下操作:

set ($group_id = $getterUtil.getLong($request.theme-display.scope-group-id))
set ($webcontent-id = "ROBAPAGINES-COL-ESQUERRA")
set ($webcontent=$journalContentUtil.getContent($group_id, $webcontent-id, "", "$locale", ""))
$webcontent

It works when the embedded web content has no structure and template but $webcontent is empty when I assign an structure-template to the same web content. 当嵌入式Web内容没有结构和模板,但是当我将结构模板分配给相同的Web内容时, $ webcontent为空时,它可以工作。

I'd greatly appreciate any help 我将不胜感激任何帮助

It seems you are calling below method for getting web-content. 看来您正在呼叫以下获取网络内容的方法。

 public static String getContent(
            long groupId, String articleId, String viewMode, String languageId,
            String xmlRequest) 

But, you can use below mentioned method which accept templatedId. 但是,您可以使用下面提到的接受templatedId的方法。

public static String getContent(
        long groupId, String articleId, String templateId, String viewMode,
        String languageId, String xmlRequest)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM