With the birth of my first child, Zachary Michael, I was away for a few days and all things web-related were far from my mind. I know, for a Web geek that is pure blasphemy, but it’s the truth!
Anyhow, I’m back at work now and continued working on the skinning of the Sitefinity CMS site we are working on for a large client of ours. Today’s focus was on the menus, of which we have two – a horizontal “primary” menu and a vertical “secondary” menu.
Note: If you are unfamiliar with this product I would highly recommend a Webcast on the topic by Gabe Sumner.
For the primary menu we used a Telerik RadMenu control and for the secondary menu a .NET TreeView control was used. If you are unfamiliar with .NET controls, they typically produce horrendous HTML – especially in non-IE browsers. The TreeView control, for example, produces a series of nested tables that’ll make your head spin. For some reason this does not happen in IE – I’m guessing they do some form of browser sniffing in order to determine what type of HTML to render in the user’s browser.
It should be noted that the Telerik RadMenu control produced good, clean HTML, as do all the controls (as far as I know) that come with Sitefinity.
Well, I couldn’t leave the TreeView control in it’s HTML mess. Imagine the nightmare it would be for users with speech browsers! Plus, like come on, its 2009 not 1998. It blows my mind how the base .NET controls produce such crappy HTML. Anyhow, ranting aside, I needed a solution.
The solution came in the form of another .NET control called CSS Friendly. Long story short, it takes all that ugly and bad HTML that a .NET control produces and turns it into XHTML-compliant mark-up.
We’ve installed and tested the control in our development environment and it’s working great. The only issue we ran into was when we left it at it’s default configuration which basically tells the control to reformat’ every .NET control. For some reason this caused login problems (Sitefinity Admin). Once we re-configured it to only reformat the menu controls, things worked as normal.
Hi,
It would be good if someone could post a basic tutorial on how to get Rad Menu working in Sitefinity. With what I can gather some sort of datasource needs to be added to the master template but has me at a loss.
Anyone with a tutorial would be gratefully appreciated.
Can I ask how come you didn’t just use the Telerik RadTreeView since that already ships with Sitefinity and clearly the .Net one is a mess?
Good point; to be completely honest, I’m not 100% sure why our development team chose it over the RadTreeView, because this is a control we use all the time in other projects. I’ll have to ask – as a lowly front-end guy, I rarely get to make those important decisions.