掲示板
How to customize liferay url format
9年前 に Satish Babu Anupoju によって更新されました。
How to customize liferay url format
Junior Member 投稿: 79 参加年月日: 11/02/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
9年前 に Ravi Kumar Gupta によって更新されました。
RE: How to customize liferay url format
Liferay Legend 投稿: 1302 参加年月日: 09/06/24 最新の投稿
9年前 に Satish Babu Anupoju によって更新されました。
RE: How to customize liferay url format
Junior Member 投稿: 79 参加年月日: 11/02/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
9年前 に Ravi Kumar Gupta によって更新されました。
RE: How to customize liferay url format
Liferay Legend 投稿: 1302 参加年月日: 09/06/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.
9年前 に Sandip Patel によって更新されました。
RE: How to customize liferay url format
Regular Member 投稿: 205 参加年月日: 11/01/05 最新の投稿
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.
8年前 に Syam Kumar によって更新されました。
RE: How to customize liferay url format
New Member 投稿: 8 参加年月日: 11/12/09 最新の投稿
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
8年前 に Andrew Jardine によって更新されました。
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.