简体   繁体   English

Liferay通过特定操作链接到另一个Portlet

[英]Liferay link to another portlet with a specific action

I have a custom navigation portlet which includes links to several pages in my portal. 我有一个定制的导航portlet,其中包含指向门户中几个页面的链接。 Some of these links, though, are "submenu" options that are actually actions of a specific portlet. 但是,其中一些链接是“子菜单”选项,实际上是特定portlet的操作。 For instance, take a look at this image: 例如,看一下这张图片:

在此处输入图片说明

I have a portlet that displays a list of movies, and can also apply a filter by genre. 我有一个Portlet,它显示电影列表,还可以按类型应用过滤器。 Those links I've circled in my image should be links to the page with the Movie List portlet, but with a different action for each link. 我在图像中圈出的那些链接应该是带有“电影列表” portlet的页面的链接,但是每个链接的动作都不同。

How can I achieve that? 我该如何实现? I can only make actionURLs within a portlet, not for other portlets. 我只能在portlet中创建actionURL,而不能为其他portlet创建actionURL。

You can create actionURLs to another portlet using the following tag provided by liferay and not by the portlet standard: 您可以使用liferay而非portlet标准提供的以下标记来创建到另一个portlet的actionURLs:

<liferay-portlet:actionURL plid="" portletName=""  />

where "plid" is the layout id of the page that the portlet is in and "portlet name" is the portlet id of the portlet that defines the actions that you want to call. 其中“ plid”是portlet所在页面的布局标识,“ portlet name”是portlet的portlet ID,该portlet定义了您要调用的操作。

However, if the links you mention, apply filters to the movies list, then you could also do the filtering on page render and not necessarily using action processing. 但是,如果您提到的链接将过滤器应用于电影列表,则还可以对页面渲染进行过滤,而不必使用动作处理。

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

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