Im creating a simple store/shop with Composite-C1, but I need help or a push in the right direction with the following:
I want to have urls like this: shop.aspx/[My_Category]/[Product-item-name]
What I have done so far:
Created two datatypes:
- Product(name,price,category(data-reference to a Categoryitem))
Created a page(shop.aspx) with an xslt function (ShopItems).
What I think I need:
The function ShopItems to do the following:
- If no category is specified in the url. Return a list of all categories
- if category specified, but no product. Return a list of all products in the specifed category
- if category and product specified. Return a single product item.
I also need a function to create url to the categories
and a function to create url to the products.
Are you suppose to create the friendly-urls manually? or is all urls transformed before its sent to the client?
My solution is heavyli inspired by the News package and how it works. I just cant figure out how its grapping information from the url.
I think i need something like the GetNewsFilterFromUrl function, but like in this discussion:
http://compositec1.codeplex.com/discussions/237709, I was not able to see how it was implemented.
I hope my questions arent too confusing, and please tell me if I need to explain myself further.