Projections and Alias module

Topics: General
Apr 11, 2013 at 7:26 AM
Edited Apr 11, 2013 at 7:27 AM

Question about projections and alias module.

I have content part named ProductPart, witch have field named Price.

I create query that uses Request.QueryString.Price token to receive desired price value from query string

My projection has permalink /projections/products

so url /projections/products?price=1000 works as aspected, price value passed via url and query returns products that have Price=>price

Now i want to slugify that url. Aliases module, seems must do exacly what i need.
In manage aliases section i see alias generated for my projection, it looks like Contents/Item/Display/340 (projection/products)
I create new alias for my projection with predefined price value parameter. Alias path=/some-products-list RoutePath=Contents/Item/Display/340?price=1000
Url /some-products-list is accessible but the query result is empty. It means that url param ?price is missing.
Url /some-products-list?price=1000 works. Url /Contents/Item/Display/340?price=1000 works too.

Do i miss something?
Apr 12, 2013 at 1:10 AM
The querystring is not part of the route as far as I understand, so I don't think Alias will be able to make that work. You may need to define your own route to make this work, where you'll be able to define the default value for price. Then again, I'm not sure how that would work with projection, so you may need to build a small controller as well.