Roffers
Roffers

Reputation: 701

Ucommerce parse niceurl or set context

I'm trying to get the current category from the url e.g. http://localhost/catalog/discs/c-24/c-92 (generated from GetNiceUrlForCategory()). But when I call SiteContext.Current.CatalogContext.CurrentCategory, returns null.

SiteContext.Current.CatalogContext.CurrentCatalogue and SiteContext.Current.CatalogContext.CurrentCatalogueGroup do not return null.

Is there another internal call where I can parse the URL or should I write my own? Can I set the context from the URL?

Upvotes: 0

Views: 69

Answers (1)

Oleksandr Skrypnyk
Oleksandr Skrypnyk

Reputation: 394

Check hostnames, it looks like they are not set for localhost

Upvotes: 0

Related Questions