Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
David B
Changing the URL of blog pages
29 de Março de 2013 03:25
Resposta

David B

Ranking: New Member

Mensagens: 9

Data de entrada: 29 de Março de 2013

Mensagens 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.
Subhash Pavuskar
RE: Changing the URL of blog pages
29 de Março de 2013 04:28
Resposta

Subhash Pavuskar

Ranking: Regular Member

Mensagens: 234

Data de entrada: 12 de Março de 2012

Mensagens 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
RE: Changing the URL of blog pages
2 de Abril de 2013 01:36
Resposta

David B

Ranking: New Member

Mensagens: 9

Data de entrada: 29 de Março de 2013

Mensagens recentes

Thanks for your links. It is what I was searching !
David B
RE: Changing the URL of blog pages
3 de Abril de 2013 05:53
Resposta

David B

Ranking: New Member

Mensagens: 9

Data de entrada: 29 de Março de 2013

Mensagens 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?