Hallo,
I'd like to get an hint how to provide the following URLs. What is the
preferred way to improve our existing URLs?
We need search-friendly URLs by naming them with clear keywords.
For example for product pages the current URL looks like:
http://localhost:8080/product.html?product=1234
This should be changed to be:
http://localhost:8080/products/category-name/product-name-1234.html
where the "category-name" and "product-name" part are optional. Only the ID
(e.g. 1234) is an essential parameter. 
I know, that the MountedMapper introduced with Wicket 1.5 is smart enough to
handle a mix of supported parameter types
(https://cwiki.apache.org/WICKET/request-mapping.html).
And I assume, that mounting the "ProductPage" could be the following way:

addPage("/products/${category_name}/${product_name}/#{id}",
ProductPage.class)

This uses a named parameter "id" and an optional named parameters
"category_name" and "product_name".

I assume that the following pattern is not working (I did not try it):

addPage("/products/${category_name}/${product_name}-#{id}.html",
ProductPage.class)

How would I provide such a pattern?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MounterMapper-and-optional-parameters-tp4655372.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to