DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Easy Grouping in XSLT 1.0

Posted by PANVEGA on June 10, 2009

I was asked to implement a grouping by TEAM with all the employees regarding to the Team Name into a SharePoint People Results Webpart. Here I am gonna show you a very nice aproach how to realize this custom request.

I read in so many posts how to create a proper grouping results in XSLT 1.0. XSLT 2.0 makes grouping even easier than Steve did. The XSLT 2.0 xsl:for-each-group instruction iterates across a series of groups, with the criteria for grouping specified by its attributes.  While XSLT 1.0 lets you sort elements, it still forces you to jump through several hoops to do anything extra with the groups that result from the sort.

Here is a snipped of the XML file:

<?xml version="1.0" ?>
 Read the rest of this entry »

Posted in MOSS, WebParts, XSLT | Tagged: , , | Leave a Comment »

Adding a Property to the Advanced People Search and a Column to the People Result Webpart

Posted by PANVEGA on June 9, 2009

A customer asked me to adding a Property Field called “Manager”  in the People Search Advanced Mode. For this demonstration I added  custom property called “Manger” to the profile properties, and in the following walkthrough I will show how to add searching on that property to the advanced search screen of the people search. In addition how to add this new field the your Search Core Results Webpart results. Tis how to is devided in 2 main parts. Read the rest of this entry »

Posted in Administration, MOSS, WebParts, XML, XSLT | Tagged: , , , , | 6 Comments »

Custom Silverlight Navigation with the SP PortalSiteMapProvider

Posted by PANVEGA on June 2, 2009

In this post I wanna explain in a few steps how to develope a custom Silverlight Navitgation for SharePoint publishing sites (Source Silverlight Blueprints on CodePlex)

SharePoint and Silverlight Blueprints on CodePlex were uploaded to include two more Silverlight RTM samples: custom navigation in SharePoint and the colleague viewer. These blueprints provide samples for you to build and explore using Silverlight as an alternate way to develop and integrate powerful user experiences within SharePoint and add rich Internet application functionality to your SharePoint sites. Included in the overall set of samples are a Hello World sample, a Slider sample, and the recently added Custom Navigation and Colleague Viewer samples added

Read the rest of this entry »

Posted in ASP.NET, C#, DotNet, MasterPage, MOSS, Silverlight | Tagged: , , , , , | 1 Comment »

Custom Table Format with the SP HTML Webpart

Posted by PANVEGA on June 2, 2009

When editing content in a SharePoint Publishing site, you can select from 5 predefined table formats when inserting a table. The image on the left lists the table formats available to select from. Although the table formats are worth consideration, they may not match the unique fonts, colors, and other branding defined elsewhere within your web site.

Microsoft Office SharePoint Server 2007 includes an advanced Rich Text Editor that supports predefined table formats. The Rich Text Editor in SharePoint Server 2007 reads the predefined table formats from cascading style sheets that are linked to the page.

You can view the OOTB styles by going to “http://yourportalsite/_layouts/1033/styles/HtmlEditorTableFormats.css


Read the rest of this entry »

Posted in CSS, MasterPage, MOSS, WebParts | Tagged: , , , | Leave a Comment »

Custom CSS Styles in the SP RichText Editor DropDown

Posted by PANVEGA on May 26, 2009

When creating content on a publishing site through a Page Content HTML editor there are some basic styles that come OOTB: The styles are actually conditional and different styles appear based on the type of content selected. Create your own set of standard header and section styles that are easily available to your content authors directly within the content editor.  These styles appear in the seldom-used “Styles” menu within the content editor toolbar.  By default, you’ll notice this menu is populated with three header styles that are just about everything but useful. Read the rest of this entry »

Posted in CSS, MasterPage, MOSS, SPDesigner, WebParts | Tagged: , , , | 1 Comment »

How to add a second SiteMapDataSource and ASPMenu into a MasterPage

Posted by PANVEGA on May 2, 2009

In a new project, I was asked to add a second QuickLaunch Navigation into a MasterPage.  The second Navigation should get a new custom CSS SiteMapProvider should start at a specific sub node.

Just go to the Sharepoint:SPNavigationManager tag search inside after SharePoint:AspMenu. You see the QuickLaunchMenu is consuming the SPNavigationProvider from the SiteMapDataSource.

However the second ASP:Menu “QuickLaunchMenuTwo” is using the SPNavigationProvider. You see how easy it is to add more SiteMapProvider to more than just one ASP:Menu in your MasterPage Read the rest of this entry »

Posted in MasterPage, MOSS | Tagged: , | Leave a Comment »

Retrieve all available values “Itemstyles.xsl”

Posted by PANVEGA on April 16, 2009

A good practice to follow when you are going to use some fields from a List or a Library in your ContentQuery Webpart is to retreive all available values.

You can find this file in the document library called ‘Style Library’ in the root of the site collection ( /Style Library/XSL Style Sheets/ItemStyle.xsl ). Open the file in an editor of choice (eg. Microsoft Office SharePoint Designer). Next check it out to be able to make changes to the file.

More about CQWP and Webparts in general follow these  links to one of my posts:

At the bottom of the XSL sheet, right before the </xsl:stylesheet>, I put in the following code:

<xsl:template name="ShowValues" match="Row[@Style='ShowValues']" mode="itemstyle">
  <xsl:for-each select="@*">
    P:<xsl:value-of select="name()" /><br />
    V:<xsl:value-of select="." /><br /><br />

This comes in handy when you are trying to write custom code in your web part and need the “proper” name of a field opposed to the GUID (e.g. “General Information” would be “General_x0020_Information”). The “P” is the parameter in the case above and the “V” is the value being passed. In some cases the stored field name is differenr from the current presentet value.

This works for any web part that is referencing your new custom Item Style XSL file.

Posted in CSS, MOSS, XSLT | Tagged: , , | 2 Comments »

Filter problems in Start-,End Time for CALENDAR “Full day event”

Posted by PANVEGA on April 14, 2009

When I make a request on a Calendar checking All Day Event it shows one thing. For now that is all right. However when I set a Filter showing just all Events from  [Today], the Event is still visible on the 3/29/2009. The Event shouild only be vusible on the 28th. Why ???????

When I view the request I see
Start Time: 3/28/2009 0:00
End Time: 3/28/2009 23:59

Example: Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

Calculated Field for the Calendar Date Filter DropDown

Posted by PANVEGA on April 14, 2009

When filtering the SP Calendar Items in a View, the Start Time and End Time are not visible in the DropDown Control somewhy. Only in the Sorting list they are visible.


I’m almost sure ethere is better way. However this is a quick and dirty solution: Read the rest of this entry »

Posted in MOSS | Tagged: | 1 Comment »

SharePoint Navigation Fly-Outs problem with IE8

Posted by PANVEGA on April 8, 2009


I configured the SharePoint QuickLinks Navigation SiteMapProvider properties to show a FlyOut menu. However after installing IE 8, the Flyouts were shown in a white box without any content links.


Add this meta Tag to your MasterPage between the <head> tages.

<meta http-equiv=”X-UA-Compatible” content=”IE=IE7″ />

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />

The first will force a page to render in IE7 mode no matter what, and the second forces a page to render as IE7 would have rendered it historically. The difference being the EmulateIE7 meta tag will force the browser to look for a DocType before rendering in IE7 mode and if it does not find one it will render in Quirks Mode. This is the correct behavior for how IE7 used to render pages and I believe the correct one that should be added to all custom current version SharePoint  master pages. Read the rest of this entry »

Posted in IE, MasterPage, MOSS | Tagged: , , | 3 Comments »

How to retrieve Sites and Pages from the SiteMapProvider recursively

Posted by PANVEGA on April 8, 2009

In this short post I gonna show you how to retreive  a SharePoint SiteMapProvider here CurrentNavSiteMapProvider (LeftNavBar) in your MasterPage and create a XML file where you gonna write the XmlNodes in a hierarchigal structure. You can use the XML for instance to add the control into your MasterPage and parse the Navigation Tree with Silverlight, JavaScript or Flash in order to get your custom animated SharePoint Navigation.

Sharepoint is going to build you a sitemapprovider based off your logical architecture of your site. So, if you site has a root site and it has children and it’s children have children – then the sitemapprovider it creates for you will look like that.

Read more about SiteMapProvider and how to customize in one of my previous post:

Provides PortalSiteMapNode objects that represent a merging of the Windows SharePoint Services 3.0 SP Navigation store and dynamic site structure, including sites and pages.

 Read the rest of this entry »

Posted in Flash, MasterPage, MOSS, Object Model, SideMapProvider, Silverlight, XML | Tagged: , , , , , , | 1 Comment »

SharePoint MasterPages CSS Registrations Approaches

Posted by PANVEGA on April 1, 2009

If you look closely to the CSS Registration in the MasterPage Header,  there are tokens here that the system replaces at runtime. Let’s examine one further, looking at the source code and then what is rendered in the browser for an example site:

1. Example

<SharePoint:CssLink runat=”server” DefaultUrl=”/Style Library/yourCSSfile1.css”/>
<SharePoint:CssRegistration name=”<% $SPUrl:~sitecollection/Style Library/yourCSSfile2.css %>” runat=”server”/>

Rendered as:

<link rel=”stylesheet” type=”text/css” href=”/_layouts/1033/styles/controls.css?rev=EhwiQKSLiI%2F4dGDs6DyUdQ%3D%3D”/>
<link rel=”stylesheet” type=”text/css” href=”/_wpresources/RadEditorSharePoint/”/>
<link rel=”stylesheet” type=”text/css” href=”/Style%20Library/yourCSSfile1.cs”/>
<link rel=”stylesheet” type=”text/css” href=”/_layouts/1033/styles/core.css?rev=yc7T90GBeB5Wkb4r5wtwNg%3D%3D”/>

<link rel=”stylesheet” type=”text/css” href=”/Style%20Library/yourCSSfile2.css”/>

SharePoint reders the default MasterPage CSS references and your custom CSS as well, when your apply for instance:

<SharePoint:CssLink runat=”server” DefaultUrl=”/Style Library/yourCSSfile1.css”/> Read the rest of this entry »

Posted in CSS, MasterPage, MOSS | Tagged: , , | 2 Comments »