Liferay DXP Free Tier    |    From download to running in minutes    |    Get started →

Blogs

Get the Query String from Page Configuration 'Advanced' option.

Set default query string without sending it in friendly URL. Can be useful in display templates.

Manushi Jani
Manushi Jani
Lectura de menos de un minuto


 

You can configure the site page with above shown string and fetch it using below code :

ServiceContextThreadLocal.getServiceContext().getRequest().getParameter("srce")

or

ParamUtil.get(ServiceContextThreadLocal.getServiceContext().getRequest(), "srce", "")

You can also fetch this in velocity template :

#set ($serviceContext = $portal.getClass().forName("com.liferay.portal.service.ServiceContextThreadLocal").getServiceContext())

#set ($httpServletRequest = $serviceContext.getRequest())

#set($seminarId =$paramUtil.getLong($httpServletRequest, 'srce'))
        

Comentarios de la página

Related Assets...

No se encontraron resultados

More Blog Entries...

Ben Turner
noviembre 26, 2026
Himanshu Chauhan
noviembre 20, 2026
Tony Lim
noviembre 19, 2026