Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Preetam Thakur
Friendly URL for Asset Publisher as wll as the pagination link
May 3, 2012 6:18 AM
Answer

Preetam Thakur

Rank: New Member

Posts: 3

Join Date: February 16, 2012

Recent Posts

Hi,

I am using asset publisher to showcase articles one at a time with latest article first and for this I have created a new display by using the "Full Content" display style. BTW I am using Liferay 6.0. Here I have chosen asset publisher as the requirement is to when user views an article, he/she should able to view "Next" & "Previous" article links. That's why I have used asset publisher and not a web content display. Everything was working fine!
But on one fine day, while I was implementing Facebook share for the articles I found that if I share an article the URL is something like below
http://www.mydomain.com/vs_details?p_p_id=101_INSTANCE_b3QX&p_p_lifecycle=0&p_p_col_id=column-8&p_p_col_count=1&_101_INSTANCE_b3QX_delta=1&_101_INSTANCE_b3QX_keywords=&_101_INSTANCE_b3QX_advancedSearch=false&_101_INSTANCE_b3QX_andOperator=true&cur=1
where the article is only gets identified by the "cur" parameter in the asset publisher. So if I share the above URL and then a new article has been added, then the shared URL will now point to new article instead of the article I shared.
And that's why I wanted the URL to be like friendly URL with either the assetEntryId or article-url-title on the URL as parameter. For that we can use the friendly URL mapper feature which has laready been set up for asset publisher by Liferay. But the problem is I have to generate the URL and call it (I guess). where as I want the asset publisher to show the friendly URL by default. An also the next & previous pagination link generate the tacky horrible URL and not the friendly one.
How can I generate friendly URL for asset publisher and the pagination link? Any help is welcome.

Thanks,
Preetam
Ezequiel Turovetzky
RE: Friendly URL for Asset Publisher as wll as the pagination link
December 31, 2012 12:28 PM
Answer

Ezequiel Turovetzky

Rank: New Member

Posts: 12

Join Date: July 4, 2012

Recent Posts

Have you found a solution? I'm facing the very same problem.
Thanks!
Bart Simpson
RE: Friendly URL for Asset Publisher as wll as the pagination link
January 1, 2013 8:58 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

Liferay 6.1 came up with better friendly url's for asset publisher, but since you are using 6.0 you'll have to generate the url's yourself. You can do this by hooking the tag lib jsp that's responsible for rendering the pagination links:
1\html\taglib\ui\page_iterator\start.jsp


Let me know if you need help in generating what links will work.
Ezequiel Turovetzky
RE: Friendly URL for Asset Publisher as wll as the pagination link
January 18, 2013 1:23 PM
Answer

Ezequiel Turovetzky

Rank: New Member

Posts: 12

Join Date: July 4, 2012

Recent Posts

I'm using 6.1 EE, and pagination URLs look pretty bad. Still, I'm going to check your solution. Thanks a lot!