Fórum

SEO - Friendly urls for a simple product list / product details navigation

Alexis Jardin, modificado 8 Anos atrás.

SEO - Friendly urls for a simple product list / product details navigation

New Member Postagens: 4 Data de Entrada: 24/02/16 Postagens Recentes
Hello,

I've done a lot of search before asking but I can't find the best way to implement what I need, even if it's a common case.
I'm using LIferay 6.2 (community edition) and I want to implement a simple typical navigation with 2 pages:

- a page for a list of products, with a firendly url such as "/products"
- a page for the detail of a product with a friendly url such as "/products/{name}_{id}", this page should show the product details and can contains other portlets.

The products come from a custom service (all stuff is ever done), and I will develop portlets in Spring MVC.

What is the best way to achieve this:
- create only one page "products" and only one "products" portlet to manage list and details (using maximized mode for details), but how to get it work with friendly url and other portlets on the details page?
- create 2 pages, one for products list and one for product detail and 2 portlets for managing the list and the details.

If you have tutorials, examples or advices it will be great!

Thanks!

Alexis
thumbnail
Anil Sunkari, modificado 8 Anos atrás.

RE: SEO - Friendly urls for a simple product list / product details navigat

Expert Postagens: 427 Data de Entrada: 12/08/09 Postagens Recentes
I suggest to go with Liferay FriendlyUrl Mapping which will exactly suits your requirement

https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/adding-friendly-url-mapping-to-the-portlet
Alexis Jardin, modificado 8 Anos atrás.

RE: SEO - Friendly urls for a simple product list / product details navigat

New Member Postagens: 4 Data de Entrada: 24/02/16 Postagens Recentes
Hi and thanks for your answer.

As I've done many search before it's one of the first link i've found... and it doesn't match my requirements because it only allows to manage firendly url for a portlet, not for a whole page with many portlets. Moreever, with the feature discribe in this link, we need the page name and the portlet name in the url, whereas I only need www.mysite.com/products and www.mysite.com/products/{product-name}_{product-id}. With the portlet friendly url feature my url would be www.mysite.com/products/-/products/{product-name}_{product-id} (according to the fact that I need a products page and a products portlet)
Even more, it doesn't help me on the choice of building one or two portlets, one or two pages and a detail page with other portlets.
As I need different layout for products list and details, I think I have to build 2 different pages.

I've found this thread which seems to match my requirements:

https://www.liferay.com/fr/community/forums/-/message_boards/message/63244965

I'll check if it can help.

Thanks