Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
David B
Changing the URL of blog pages
29. März 2013 03:25
Antwort

David B

Rang: New Member

Nachrichten: 9

Eintrittsdatum: 29. März 2013

Neue Beiträge

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. März 2013 04:28
Antwort

Subhash Pavuskar

Rang: Regular Member

Nachrichten: 234

Eintrittsdatum: 12. März 2012

Neue Beiträge

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. April 2013 01:36
Antwort

David B

Rang: New Member

Nachrichten: 9

Eintrittsdatum: 29. März 2013

Neue Beiträge

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

David B

Rang: New Member

Nachrichten: 9

Eintrittsdatum: 29. März 2013

Neue Beiträge

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?