Is there any way how to access GET or POST parameters from ASSET PUBLISHER velocity template?

For example, if I have one asset publisher on site /announcements, i need to access GET parameters for example: /announcements?display=maximized.

Is there any solution how to access 'display' parameter from velocity template in asset publisher?

Thanks a lot.

有帮助吗?

解决方案

All right, I have found the right solution. In VM template we need to use this command:

$portalUtil.getOriginalServletRequest($request).getParameter('parameter-name')

其他提示

In my liferay theme I am getting request parameters this way:

$request.getParameter("display")

So you may try the same in your template file.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top