I've been integrating Able with a custom CMS and have another question. This time about custom urls.
I've gotten our CMS to pass processing of the "normal" product URLs to Able, but so far can't get the custom urls to behave the same way.
So, for example, if I have myproduct, the Able-generated URL will be myproduct.aspx, and the CMS will pass that to Able which will render fine. But if I create a custom url for this product, "mycustomurl.aspx", Able will deliver it fine, but the CMS (which has the Able assemblies loaded) doesn't seem aware of it and tries to load it itself.
Can someone explain how the routing of custom URLs is different from regular product urls that would cause this? Is there some configuration (in web.config or elsewhere) that I haven't added to my CMS that would enable this behaviour?
Thanks,
Andrew
Custom Url Routing
-
- Ensign (ENS)
- Posts: 12
- Joined: Thu Jan 31, 2013 4:53 pm
Re: Custom Url Routing
I've made a little more progress on my own, but let me try to explain this a little better what my goal is:
We have an in-house CMS that works great for traditional CMS stuff, templating, extensionless urls, etc...but we need to add ecommerce capabilities to it, so we're trying to make the two work together as seamlessly as possible. So far:
We can show the featured products, the basket contents (via basket.aspx), and product pages (via either product.aspx or some other magic routing that happens with a custom url).
The part I'm stuck on is getting the ProductPage control to run inside a CMS page. This is because the product page control is:
We have an in-house CMS that works great for traditional CMS stuff, templating, extensionless urls, etc...but we need to add ecommerce capabilities to it, so we're trying to make the two work together as seamlessly as possible. So far:
- Referenced Able assemblies and copied over relevant web.config / app_data sections
- Copied over ConLib ascx controls (without code-behinds), and a few of the base able pages like product.aspx, basket.aspx
We can show the featured products, the basket contents (via basket.aspx), and product pages (via either product.aspx or some other magic routing that happens with a custom url).
The part I'm stuck on is getting the ProductPage control to run inside a CMS page. This is because the product page control is:
- Made of quite a few separate controls
- All these controls that need a product ID do so via PageHelper.GetProductId()
- That lookup happens very early in the control's lifecycle (Page_Init, which I think is the first event in a User Control's life. From what I've seen User Controls do not have a PreInit)
- Load a product in code from its CustomUrl
- Prevent (OR take advantage of) whatever Able does to route CustomUrls....this doesn't appear to hit Product.aspx?
- Somehow pass that product / id to the ascx control that will be running in the CMS and not Able