Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Gwowen Fu
Create URL to Asset Publisher with category id
September 28, 2012 10:50 AM

Gwowen Fu

Rank: Expert

Posts: 315

Join Date: December 27, 2010

Recent Posts

In web content, I want to have a URL link that will open asset publisher in current page or different page that shows documents tagged by category ID passed from the URL link.

The Java code I found for this is something like this:

PortletURL portletURL = PortletURLFactoryUtil.create(request, PortletKeys.ASSET_PUBLISHER, plid, PortletRequest.RENDER_PHASE);
portletURL.setParameter("struts_action", "/asset_publisher/view_content");
portletURL.setParameter("type", assetRendererFactory.getType());
portletURL.setParameter("urlTitle", assetRenderer.getUrlTitle());

How do I set the category ID for asset publish through PortletURL?

Thanks for any help!
Pablo Rendón
RE: Create URL to Asset Publisher with category id
February 18, 2013 5:44 AM

Pablo Rendón

Rank: New Member

Posts: 8

Join Date: December 29, 2011

Recent Posts

You can find an example of how to filter the asset publisher by category or tag dynamically and the creation of the URL in a hook here:

however you can apply the same concept in a portlet or in a theme...
I hope this helps....