Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
David B
Changing the URL of blog pages
March 29, 2013 3:25 AM
Answer

David B

Rank: New Member

Posts: 9

Join Date: March 29, 2013

Recent Posts

Hello,

I actuallly use the blog tool to display several news.
My problem is that the url generated at the loading of the pages is too complex and thus the PageRank obtained is not satisfying.

The current URL generated is :
/actuality?p_p_id=33&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_pos=1&p_p_col_count=2&_33_struts_action=%2Fblogs%2Fview&_33_delta=25&_33_keywords=&_33_advancedSearch=false&_33_andOperator=true&p_r_p_564233524_resetCur=false&_33_cur=2.

I'm looking for a way to simplify this URL and get something which looks like : /actualites-page2

Thanks for your help.
Subhash Pavuskar
RE: Changing the URL of blog pages
March 29, 2013 4:28 AM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 229

Join Date: March 12, 2012

Recent Posts

Hi,
make it friendly URL !!!! Hope following link may help you !!
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/adding-friendly-url-mapping-to-the-portlet
http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/optional%3A-adding-friendly-url-mapping-to-the-portlet
http://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper
David B
RE: Changing the URL of blog pages
April 2, 2013 1:36 AM
Answer

David B

Rank: New Member

Posts: 9

Join Date: March 29, 2013

Recent Posts

Thanks for your links. It is what I was searching !
David B
RE: Changing the URL of blog pages
April 3, 2013 5:53 AM
Answer

David B

Rank: New Member

Posts: 9

Join Date: March 29, 2013

Recent Posts

I finally manage to simplify the url but I can't hidde the last parameter. I think it's because of the javascript function curupdateCur which is called after the url mapping process.

Url : http://localhost/guest/home/-/blogs/?_33_cur=1

Liferay.provide(
window,
'_33_curupdateCur',
function(cur) {
if (true) {
var href = "http://localhost/assurances/guest/home/-/blogs/page?_33_cur=" + cur + "";
location.href = href;
}
else {
document._33_fm.cur.value = cur;
;
}
},
['aui-base']
);

Does someone has a solution to map this parameter without overriding the java script function?