Fórum

Changing the URL of blog pages

David Bernard, modificado 11 Anos atrás.

Changing the URL of blog pages

New Member Postagens: 9 Data de Entrada: 29/03/13 Postagens Recentes
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.
thumbnail
Subhash Pavuskar, modificado 11 Anos atrás.

RE: Changing the URL of blog pages

Regular Member Postagens: 234 Data de Entrada: 13/03/12 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Changing the URL of blog pages

New Member Postagens: 9 Data de Entrada: 29/03/13 Postagens Recentes
Thanks for your links. It is what I was searching !
David B, modificado 10 Anos atrás.

RE: Changing the URL of blog pages

New Member Postagens: 9 Data de Entrada: 29/03/13 Postagens Recentes
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?