Pergunta

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.

Foi útil?

Solução

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

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

Outras dicas

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

$request.getParameter("display")

So you may try the same in your template file.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top