我正在尝试从网址中获取当前类别,例如http://localhost/catalog/discs/c-24/c-92(从GetNiceUrlForCategory()生成)。但是,当我调用SiteContext.Current.CatalogContext.CurrentCategory
时,返回null。
SiteContext.Current.CatalogContext.CurrentCatalogue
和SiteContext.Current.CatalogContext.CurrentCatalogueGroup
不返回null。
是否存在另一个可以解析URL的内部调用,还是应该自己编写? 我可以从URL设置上下文吗?