Menu Navigation

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
Right click on the user control and select "Convert to web application"

It is missing the desiger.cs file (nopCommerceWeb was converted to Web Project in this release)

That should sort it for you.

Cheers,
Ben
15 years ago
Hey Ben,

Thanks for the quick response.  The designer.cs was there but I actually had to open it up for it to update I guess?  Thanks for pointing me in the right direction.

WaltD
15 years ago
Does anyone have an idea why in v1.10 the asp:menu worked when I added a cssclass to the menu as well as the dynamicmenuitemstyle-cssclass and all the other cssclasses.  However, when I upgraded to v1.11, all I get now if I look at page source is the menu is all defaulting to "AspNet-Menu" and AspNET-Menu-WithChildren, etc.  It's like it's ignoring the cssclass tag that I've added.  What changed between the two versions that may cause this?
15 years ago
Walt, i have that done and working in 1.11.

here is what you should :
        protected void dlCategories_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                Category category = e.Item.DataItem as Category;
                HyperLink hlImageLink = e.Item.FindControl("hlImageLink") as HyperLink;
                string categoryURL = SEOHelper.GetCategoryURL(category.CategoryID);
                e.Item.CssClass = category.cssClass;

                if (hlImageLink != null || category.PictureID != 0)
                {
                    hlImageLink.Text = category.Name;
                    //hlImageLink.ImageUrl = PictureManager.GetPictureUrl(category.PictureID, 15, 15, true);
                    hlImageLink.NavigateUrl = categoryURL;
                }
                else
                {
                    hlImageLink.Visible = false;
                }

                HyperLink hlCategory = e.Item.FindControl("hlCategory") as HyperLink;
                if (hlCategory != null)
                {
                    hlCategory.NavigateUrl = categoryURL;
                }
            }
        }
15 years ago
The thing that changes was that CSS Friendly adapters were implemented. You should read the documentation at the ASP.net site to see how the CSS classes are structured as they appear a bit strange at first glance.

Hope this helps,
Ben
15 years ago
Yeh, I finally did a search on AspNet-Menu-WithChildren and came across the documentation on asp.net's website.  Still kind of a pain to work with but it works and I just got it finished.

Thanks,
WaltD
15 years ago
Agree - the admin menu in nopcommerce took a while to get right. But at least the menu is rendered as a nice unordered list instead of nested tables :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.