Friday, 27 May 2011

Hide First Tab(Home) in SharePoint 2010 Navigation

You will notice that the Home tab actually is the first node and then has a child UL which represents the rest of the navigation Items. So the approach is to hide the first <li> <a> (display: none) and then simply just use (display:block ) to show the hidden <ul> <li> <a> tags.
Here is the CSS you could use to hide just the first node (home) tab in a SharePoint 2010 application:
.s4-tn li.static > a{
display: none !important;
.s4-tn li.static > ul a{
display: block !important;

Changes in SharePoint Designer are not gettings saved

If we do any xslt modifications for XSLT List View WebParts, those changes wont get reflected in the UI but you can observe those changes in the design mode. To resolve this issue search for ddwrt:ghost="hide" and remove.

Regional Settings

User can specify the regional settings from his My settings section. If he didnt specify system will take the current web regional settings.
Object Model:
SPRegionalSettings regionalSettings;
SPUser user = SPContext.Current.Web.CurrentUser;
regionalSettings = user.RegionalSettings;
if (regionalSettings != null)
lblTimeZone.Text = regionalSettings.TimeZone.Description;
lblTimeZone.Text = regionalSettings.TimeZone.Description;