I'm using Liferay 6.2 and I'm having a hard time to show a web content of "portlet-journal-content-search", at another portlet "portlet-asset-publisher", that stays in another page.
My bigger difficult is the fact that I need after make my search of a web content, that the system shows all the results with a Link for their "display page", and to the portlet "portlet-asset-publisher". Each result must have a link being generated dynamically, because each result will have a different "display page".
I tryied to find in the code where the information about "display page" of the web content is, but I didn't found it.
I thought I would use the Liferay tag "renderURL" to do this, but I do not know how I'm going to send my content and how I could get the "display page" dynamically!
Today When I click at the link to be redirected to my content I go to the same page and to the portlet ".portlet-journal-content". The code is like:
<%
PortletURL webContentPortletURL = PortletURLFactoryUtil.create(request, targetPortletId, plid, PortletRequest.RENDER_PHASE);
webContentPortletURL.setParameter("struts_action", "/journal_content/view");
webContentPortletURL.setParameter("groupId",
String.valueOf(articleGroupId));
webContentPortletURL.setParameter("articleId", articleId);
%>
<br />
<a href="<%= webContentPortletURL.toString() %>"><%= StringUtil.shorten(webContentPortletURL.toString(), 100) %></a>
But I need to be redirected to the "Display Page" of my content ("TestandoPagina" name of the page of ScreenShot), and It must be showed at the portlet ".portlet-asset-publisher". The code that I was trying to do, but It's not working, is:
<portlet:defineObjects />
<liferay-theme:defineObjects />
<%
String portletId = PortletKeys.ASSET_PUBLISHER;
long otherPlid = PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), portletId);
%>
<liferay-portlet:renderURL var="testURL" plid="<%=otherPlid%>" portletName="<%=portletId%>">
<liferay-portlet:param name="groupId" value="<%= String.valueOf(articleGroupId) %>" />
<liferay-portlet:param name="articleId" value="<%= articleId %>" />
</liferay-portlet:renderURL>
<br /><a href="<%= testURL %>"><%= StringUtil.shorten(testURL.toString(), 100) %></a>
Can someone helps me with it? Thank you very much.
Here's some screenshots of How It's working now:
A Web Content example with his "Display Page" called "TestandoPagina"
Then I search for the web content at ".portlet-journal-content-search".
The result of my research with the "wrong" Links
What happens when I clickat this Link today, I stay at the same page "Processos" and my content is showed at ".portlet-journal-content", and I want to go to his "display page", at this example called "TestandoPagina" and the content be showed at the ".portlet-asset-publisher".