在我的Header Liferay 6.2中添加自定义Portlet

问题描述 投票:0回答:2

我想在我的liferay的标题中添加一个自定义portlet,但我不知道该怎么做。

我知道我可以在门户网站中添加内容.... vm。但对于整个portlet ..

可能吗 ?

提前致谢。

liferay liferay-6 liferay-theme liferay-hook
2个回答
0
投票

当然有可能!!您必须从thema中嵌入portlet作为标题,或者留出空间以便能够在那里输入portlet

#set ($portlet_id = '73')
#set ($instance_id = 'E3j7')
#set ($my_portlet_id = "${portlet_id}_INSTANCE_${instance_id})

您需要portlet ID才能在标头中使用它

文档:https://web.liferay.com/es/community/wiki/-/wiki/Main/Embedding+a+portlet+in+the+theme


0
投票

在.vm主题文件中使用此行:

$theme.runtime($portletId, $queryString, $velocityPortletPreferences.toString())

您可以从portlet的“外观和感觉”>“高级样式”中获取Portlet ID

如果它是这样的:#portlet_welcome_WAR_Helloportlet,你将使用welcome_WAR_Helloportlet代替主题中的ID。

要获得有关此工作方式以及如何正确使用此方法的更多信息,我建议您按照信息查找herehere

© www.soinside.com 2019 - 2024. All rights reserved.