I'm trying to use the razor code for navigation from the Ucommerce demo in my project, using mvc. I keep either getting the page with no navigation, or a server error "CS0103: The name 'category' does not exist in the current context".
Line 13: foreach (var category in categories){
Line 14: <div class="toptest">
Line 15: <a href="#" class="topnavtext topnavvitamins-supplements topnavlinklevel0" title="">@category.DisplayName()</a>
Line 16: <div class="subnavright"></div>
Line 17: </div>
You want to make sure that the catalog context is initialized properly.
By default uCommerce uses querystring parameters in the URL to determine what the current catalog, category, and product is. If you're using a custom URL scheme you will want to override the default CatalogContext class with your own.
For MVC I don't believe changing the URL rewriting rules is applicaple.
Ucommerce Demo Razor in Mvc
I'm trying to use the razor code for navigation from the Ucommerce demo in my project, using mvc. I keep either getting the page with no navigation, or a server error "CS0103: The name 'category' does not exist in the current context".
Line 13: foreach (var category in categories){ Line 14: <div class="toptest"> Line 15: <a href="#" class="topnavtext topnavvitamins-supplements topnavlinklevel0" title="">@category.DisplayName()</a> Line 16: <div class="subnavright"></div> Line 17: </div>
Any help would be appreciated!
-Morgan
You want to make sure that the catalog context is initialized properly.
By default uCommerce uses querystring parameters in the URL to determine what the current catalog, category, and product is. If you're using a custom URL scheme you will want to override the default CatalogContext class with your own.
For MVC I don't believe changing the URL rewriting rules is applicaple.
is working on a reply...