Message Boards

Liferay 7.1 - Set portlet page into liferay-portlet:runtime tag as param

Luigi Giovanditti, modified 3 Years ago.

Liferay 7.1 - Set portlet page into liferay-portlet:runtime tag as param

New Member Post: 1 Join Date: 6/10/20 Recent Posts
I need to include another portlet into my JSP, the included portlet has more pages, how I can set initial page as parameter into liferay-portlet:runtime tag?
thumbnail
Mohammed Yasin, modified 3 Years ago.

RE: Liferay 7.1 - Set portlet page into liferay-portlet:runtime tag as para

Liferay Master Posts: 591 Join Date: 8/8/14 Recent Posts
Hi ,
I understand your question as  whenever portlet is being called from  another portlet then you can want to show a specific view ,
You can use the queryString attribute of the portlet:runtime tag and retrieve that value in included portlet and based on that you can have initial page .
Portlet A
<liferay-portlet:runtime querystring="initalPage=abc.jsp"  portletname="Portlet B" instanceid="instanceId"  ></liferay-portlet:runtime>
Portlet B
​​​​​​​
if(${param.initalPage eq abc.jsp}) {
//include page
}else{
//include page
}