Software Blog: Css

Posted under: Web Development

One of the biggest annoyances in ASP.NET is the way it adds CSS files to your <head> element of your pages. It insists on adding them to the end, offering you no way to add your own custom styles that override the theme unless you go down the line and add !important to each element.

This is especially detrimental if you're trying to add IE-only stylesheets using conditional comments. Since the theme files are loaded after the IE stylesheet, all your custom styles will be overridden as if it was not present at all.

There are some hacks, from using ...

Full story

Posted under: Web Development

If you need to ensure that the RadPanelBar control (which I use for sidebar navigation) remains expanded, check out the RadPanelbar1_ItemDataBound method in the control located at /Sitefinity/UserControls/Navigation35/SitePanelBar.ascx.

This control checks the hideUrlForGroupPages, removing the link if set to true on your control. However, this doesn't prevent the link from being active, collapsing the nodes when clicked. I need my menu to be fully expanded, so I modified the code using some newly discovered properties in the e (RadPanelEventArgs) parameter:

public void  RadPanelbar1_ItemDataBound(object  sender,  RadPanelBarEventArgs  e)
{
     if  (!hideUrlForGroupPages)  return;

     var  node = e.Item.DataItem  as  CmsSiteMapNode;
     if  (node ...
Full story