Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# swilliam 5/22/2007 9:09 AM
Dear All

I've just had to make a change to the Cuyahoga.Web project to help menu rendering. We have a header and footer menu, with menu items seperated by a graphic (the old fence posts and fence panels problem). This works with IE7 and Firefox, but with IE6 we cannot find a way to prevent the graphic rendering for every item.

We changed the first menu item <li/> to have a class of "first" so that we can prevent rendering for that item.

A sample code snippet from PageEngine.GetMenuControls()
// The menu is just a simple <ul> list.
HtmlGenericControl listControl = new HtmlGenericControl("ul");
int nodeIndex = 0;

foreach (Node node in menu.Nodes)
{
	if (node.ViewAllowed(this.CuyahogaUser))
	{
		HtmlGenericControl listItem = new HtmlGenericControl("li");
		if (nodeIndex++ == 0) {
			listItem.Attributes.Add("class", "first");
		}

		....

	}
}

This might also be useful for other menu rendering areas.

Many thanks

Simon