留言板
How to customize liferay url format
Satish Babu Anupoju,修改在9 年前。
How to customize liferay url format
Junior Member 帖子: 79 加入日期: 11-2-20 最近的帖子
Hi Team
I am working on ecommorce implementation. Where I need to form URL like liferay url format fashion : "https://www.liferay.com/about-us/newsroom/in-the-news".
As per our requirement my target url format should be like : http://www.domainname.com/location/category/sub-category/title. (This is SEO friendly url format)
Can anyone advice me how to implement this
Regards
Satish Babu
I am working on ecommorce implementation. Where I need to form URL like liferay url format fashion : "https://www.liferay.com/about-us/newsroom/in-the-news".
As per our requirement my target url format should be like : http://www.domainname.com/location/category/sub-category/title. (This is SEO friendly url format)
Can anyone advice me how to implement this
Regards
Satish Babu
Ravi Kumar Gupta,修改在9 年前。
RE: How to customize liferay url format
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Satish Babu Anupoju,修改在9 年前。
RE: How to customize liferay url format
Junior Member 帖子: 79 加入日期: 11-2-20 最近的帖子
Hi Ravi
Thanks for sharing the link.
Got the output as mentioned in the article and getting the url format like : http://localhost:8080/web/guest/welcome/-/ems/action/getEmployee/employeeId/5?p_auth=3PFjIsW1
From the above url employeeId parameter formatted like employeeId/5 .
But as per my requirement I need to form the url pattern like : http://www.domainname.com/location/category/sub-category/title
Want to construct a url with only values ( no keys)
Please let me know if you need more clarity.
Regards
Satish Babu
Thanks for sharing the link.
Got the output as mentioned in the article and getting the url format like : http://localhost:8080/web/guest/welcome/-/ems/action/getEmployee/employeeId/5?p_auth=3PFjIsW1
From the above url employeeId parameter formatted like employeeId/5 .
But as per my requirement I need to form the url pattern like : http://www.domainname.com/location/category/sub-category/title
Want to construct a url with only values ( no keys)
Please let me know if you need more clarity.
Regards
Satish Babu
Ravi Kumar Gupta,修改在9 年前。
RE: How to customize liferay url format
Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Liferay friendly urls start with /-/...
Now, <pattern>/action/{actionName}/employeeId/{empId:\d+}</pattern> in friendly url route.xml can be played with.
Why not use
<pattern>/{actionName}/{empId:\d+}</pattern>
Or anything that suits you. I am not sure whether this will work fine, but you can try.
Now, <pattern>/action/{actionName}/employeeId/{empId:\d+}</pattern> in friendly url route.xml can be played with.
Why not use
<pattern>/{actionName}/{empId:\d+}</pattern>
Or anything that suits you. I am not sure whether this will work fine, but you can try.
Sandip Patel,修改在9 年前。
RE: How to customize liferay url format
Regular Member 帖子: 205 加入日期: 11-1-5 最近的帖子
Hi,
As Ravi has mentioned Liferay freindly URL start with start with /-/... So URL before it must be there as it is Liferay site name and page name. But you can create own customize URL in routes.xml as <pattern>/{location}/{category}/{category}/{title}</pattern>.
Your URL looks like http://www.domainname.com/web/guest/welcome/{location}/{category}/{category}/{title}. This format can be supported in SEO as Liferay's all type of URL support SEO.
As Ravi has mentioned Liferay freindly URL start with start with /-/... So URL before it must be there as it is Liferay site name and page name. But you can create own customize URL in routes.xml as <pattern>/{location}/{category}/{category}/{title}</pattern>.
Your URL looks like http://www.domainname.com/web/guest/welcome/{location}/{category}/{category}/{title}. This format can be supported in SEO as Liferay's all type of URL support SEO.
Hi Sandip
I am new to Liferay and I have same kind of requirement.
Could you please explain me how to include / write the required conditions in routes.xml
Regards
Syam Kumar
I am new to Liferay and I have same kind of requirement.
Could you please explain me how to include / write the required conditions in routes.xml
Regards
Syam Kumar
Andrew Jardine,修改在8 年前。
RE: How to customize liferay url format
Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
Hi Syam,
There are a lot of really good examples out there on how to do some of this stuff. For example, Meera has provided a pretty thorough example on his blog: http://www.liferaysavvy.com/2014/06/liferay-friendly-url.html.
You don't actually need to specify all the implicit parameters for p_p_id, or plid etc anymore, just your own paramters that you want to make friendly. If you have a specific example that you need help with, feel free to post it here.
There are a lot of really good examples out there on how to do some of this stuff. For example, Meera has provided a pretty thorough example on his blog: http://www.liferaysavvy.com/2014/06/liferay-friendly-url.html.
You don't actually need to specify all the implicit parameters for p_p_id, or plid etc anymore, just your own paramters that you want to make friendly. If you have a specific example that you need help with, feel free to post it here.