Sunday, April 28, 2013

Compare SharePoint 2013 editions

A quick reference for comparing the several editions
(Office 365 plans, standalone plans & on-premise)

Tuesday, April 23, 2013

Thursday, April 18, 2013

Crawling publishing image fields

When you crawl an image field in SharePoint 2010, you will notice that its crawled property does not contain any data. You have several options to work around this issue, but my favourite option is by using a custom META tag. The SharePoint crawler will provide every META tag as a crawled property. These crawl properties can be found below the Categories > Web section in the Managed Properties module of the search service application. These properties are available with the same name of the custom tags, in uppercase.

 
   <meta name=’myImageFieldMetaTag’ content=’<SharePointWebControls:FieldValue  FieldName="myImageField" runat="server" id="myImageFieldId"/>’ id="myImageFieldMetaTagId" />



What about SharePoint 2013?

I haven't tried it yet, but it seems like it's supported in the new version.
All site columns that contain values will automatically become managed properties when they're crawled. A publishing image field is one of them and will be crawled with the following name syntax:

Crawled property name: ows_q_IMGE_SiteColumnName
Managed property name: SiteColumnNameOWSIMGE

I'm not sure yet, if I like the auto generation. Those names are not that userfriendly, but yes... it doesn't matter in this case.

Reference: Automatically created managed properties in SharePoint Server 2013

Friday, April 12, 2013

No sitecollections available in content database

After a content database restore we coudn't access our sitecollection anymore. We verifed the content database status and number of sitecollections. In our case, the current number of sitecollections was equal to 0.


We fixed this by running a couple of Powershell commands...

1. Retrieve content database GUID
Get-SPContentDatabase
2. Synchronizes the content database with the configuration database of the farm with respect to what site collections actually exist in the content database
$cdb = get-spcontentdatabase -Identity [insert guid of contentdatabase here]
$cdb.RefreshSitesInConfigurationDatabase()
Reference: MSDN

Monday, April 8, 2013

Display specific managed metadata in refinement panel - SharePoint 2010

Another blogpost about SharePoint 2010? Yes I know, it's time to move on... but hey, not every customer has already the new version of SharePoint. This information is not really unique on the web, but it's more a reminder for myself ;)

The refinement panel webpart's FilterCategoriesDefinition property contains the XML that specifies the filter categories. If you want to modify the categories, don't forget to clear the "Use Default Configuration" checkbox.

Display all managed metadata fields

Display only specific managed metadata fields
Place the following XSL stylesheet into the XSL property of the refinement panel to view the raw XML, returned by the search...

  
  
   
   
   <xsl:copy-of select="*"/> 
  
 

The raw XML outputs the different filtercategories. Each filtercategory has a specific ID with prefix 'Metadata_xxxxx'. Copy the last part of the ID (i.e. 'xxxxx') and use this value to set the title of the category within the filter category definition section:

Thursday, March 21, 2013

SharePoint 2013 meets a new Global Assembly Cache (GAC)

As a SharePoint developer you need to muddle in the Globale Assembly Cache (GAC) from time to time. Be aware that SharePoint 2013 now uses a different CLR (v4.0).This means that the GAC directory is moved from c:\windows\assembly to c:\windows\microsoft.net\assembly.

If you don't find your assembly in the GAC - think twice!

Sunday, October 28, 2012

Hide list column headers of a list view webpart

Hide list column headers of all list view webparts on the page

  1. Add a Content Editor WebPart (CEWP) to the page
  2. Use the following CSS:
    
    

Hide column headers of a specific list view webpart


The method, described in the following blogpost will definitely work (find listview by title), but there is a downside with this method. What if the end user renames the list? Our solution will break.

I think it's safer to find a listview by URL. The URL is fixed and cannot be changed from the UI (only with SharePoint Designer).
  1. Add a Content Editor WebPart (CEWP) to the page
  2. Use the following JQuery script: !! Don't forget to change the URL to the URL of your list
  3.