Thursday, May 17, 2007

Aspdotnetstorefront Menu

ASPDNSF uses a 3rd-party component for their navigation menus, Component Art. I've had some fun and exciting times customizing this menu. I would put styles, such as color and font, in the css classes TopMenuGroup and TopMenuItem, and the styles weren't sticking. Sooo frustrating! So using my IE DOM explorer, I highlighted the element (Find -> Select Element by Click) and examined the style, and found my target element to be wrapped in , which was elminating my css class assigned in the .

Here it is interesting to note that this menu is built on the fly, and you as a developer do not get to play with how this menu is created at runtime. I did some research on the NOBR tag and learned it was not css-friendly, but I took a leap of faith and added this to my stylesheet:

.TopMenuItem, .TopMenuItem NOBR, .TopMenuItemHover NOBR
{
background: #443A23;
color: #fff;
}

And voila! My css-styles were now applied.

I'm still struggling with the fact that the marriage between ASPDNSF and Component Arts is not flexible. If you decide to take your top categories horizontally across the top of the screen, you end up having to hard code your menu values in the menuData.xml file and you lose your tie to the category admin component. What this means is that if you change the name of the category, or add a new category, or make a category unpublished, these changes will not be reflected on the front end until you manually modify the xml data file. What a pain. If anyone has gotten around this little feature, I would give you a homemade chocolate chip cookie.

1 comment:

webpresence said...

Hey Robin,

I liked your post on Component Art. We haven't written any Component Art articles yet, but we've done plenty on XML, design, navigation and AspDotNetStoreFront marketing.

Visit out AspDotNetStoreFront Blog