This is probably a very easy question, but I'm still scratching my head on something. It's not really extremely important, but in the interest of having a complete understanding of things, I need to ask the question.

When the StarterSite generates the menu at the top of the page in a ASP:Menu control, it does so from the Web.Sitemap file by way of a SiteMapDataSource. That's pretty straight forward.

The question I have, and I know it's not necessarily a Commerce Server 2007 question, is when the Products menu item is generated, it's generated from the CatalogSiteMapProvider. I can't, for the life of me, figure out how it generates the URL for the Products item in the main menu. I've been digging through the code in CatalogSiteMapProvider.cs, but it seems like the catalog URI for the catalog is passed in when the provider is instantiated. However, I can't figure out where or when it's instantiated during the lifetime of the request. I HAVE been able to figure out where the label is defined in the site.resx file, but I haven't found where the mapping to ~/Products/Default.aspx is defined.

Is this stored in the database Is it in a configuration file Is it determined programatically

I know this is probably very trivial, but it's been driving me nuts!

Thanks in advance.

Re: Commerce Server 2007 CatalogSiteMap Question


BTW, just as a point of clarification, I realize there isn't a /Products/ subfolder in the StarterSite. However, if you put your mouse over the "Products" menu item, that's the URL that appears in the status bar. I'm assuming that the URL gets mapped to Browse.aspx in the application.

Still, where does this get passed to the CatalogSiteMapProvider


Re: Commerce Server 2007 CatalogSiteMap Question

Max Akbar - MSFT

Starter Site uses a site handler to rewrite URLs, we do this to make the site easier for search engines. So the URL will not map to any folder. We also wrote a SiteMap Provider "CatalogSiteMapProider" the displaies the cataogs and categories on the site.

Code Snippet
<add name="SiteMap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web.sitemap" />
<add name="CatalogSiteMap" type="CommerceSite.CatalogSiteMapProvider" />
<location path="Products">
<add verb="*" path="*.aspx" type="CommerceSite.RewrittenCatalogUriHandler, App_Code" />

The handler code is located under the App_Code\httpHandlers\RewrittenCatalogUriHandler.cs.

There are several files that you should be looking CatalogItemUriFormat.cs, PageConstants.cs, CatalogItemUri.cs, CatalogItemUriData.cs and CatalogSiteMapProvider.cs. Hopefully this will give you a direction.


Re: Commerce Server 2007 CatalogSiteMap Question



You are a genius!!!


Re: Commerce Server 2007 CatalogSiteMap Question




the URL for products goes like this /products/default.aspx

but now i want that it should go as follows


please notice the "s"

how to do that SSL based.

please help me.