SharePoint Config

Ari Bakker's thoughts on customising and configuring SharePoint

Archive for the ‘Development’ Category

Adding Managed Metadata Fields to SharePoint Publishing Pages

with 6 comments

The Managed Metadata functionality provided by SharePoint 2010 allows you to centrally manage metadata and keywords. In a previous post I covered how to provision a SharePoint 2010 managed metadata field and add this to a content type and a list definition. In this post I will cover how to add these types of fields to a publishing page layout so that content authors can add metadata and keywords to webpages they create using these layouts.

sharepoint-publishing-page-managed-metadata-field

If there are a large number of content pages this type of tagging can help users find information as these columns can be used… Continue reading Adding Managed Metadata Fields to SharePoint Publishing Pages »

Written by Ari Bakker

September 28th, 2011 at 1:07 pm

Creating SharePoint 2010 search scopes programmatically

with 6 comments

Search scopes improve the SharePoint search experience by letting users search over a subset of information within an organisation. For example you can create a search scope for a specific project or a group such as Legal or Marketing. Search scopes can either be created at the search service application level and ‘shared’ by all site collections, or defined within a specific site collection.

Shared search scopes in SharePoint 2010 can easily be created using PowerShell commands such as New-SPEnterpriseSearchQueryScope. Corey Roth covers this in his article on Creating Enterprise Search Scopes with PowerShell. While the PowerShell method can also be used to create site collection related search scopes you might also want to do this programmatically in a feature receiver when the site collection is created. Another thing you might want to do programmatically is to associate a search scope with a display group such as the ‘Search Dropdown’ so it appears in options next to the search box. I’ll cover both these scenarios in this article.

custom search scope

Written by Ari Bakker

April 8th, 2011 at 2:39 pm

Issues creating SharePoint 2010 search scopes programmatically

with 4 comments

The SharePoint 2010 object model has several classes that can be used to create search scopes and display groups. These can be useful if you want to create search scopes in a feature receiver when a site collection is created. There are several things to watch out for, however, as you can run into problems if you use the SearchContext, SearchServiceApplication and SearchServiceApplicationProxy classes. This article describes these problems so you can avoid them in your code.

search scope creation error

Written by Ari Bakker

April 1st, 2011 at 9:21 am

Issues provisioning SharePoint 2010 Managed Metadata fields

with 14 comments

I’ve been working with the managed metadata functionality provided in SharePoint 2010 fairly extensively over the past few months. While it is a great feature and works well when used through the UI it has several rough edges that can cause problems when you are deploying features that use managed metadata fields. Some of these have been documented elsewhere but some of these haven’t so this will be the first of two posts covering (1) some of the potential problems using managed metadata (this post), and (2) a robust way of provisioning SharePoint 2010 managed metadata fields.

sp2010-health-critical

Written by Ari Bakker

March 7th, 2011 at 11:17 am

VS2010 list definition template missing file dialog view

with 10 comments

When you use the Visual Studio 2010 SharePoint List Definition template the view that is rendered in file dialog boxes when opening and saving Office documents is blank. This causes a loss of functionality if you are creating custom document library definitions as you cannot navigate folders or use metadata sorting in the dialog window. Thankfully there is a relatively easy fix as described in the article.

Written by Ari Bakker

February 15th, 2011 at 9:44 pm

Displaying files from a specific folder using SPDataSource

without comments

This is a short post to show how you can use the SPDataSource to display items from a specific folder in a SharePoint document library. While the other parameters are fairly well documented on MSDN this isn’t very clear. Generally I don’t recommend the use of folders to separate data, I prefer a metadata based approach. In some cases, however, it makes sense such as when you need to manage permissions or approval for a group of documents (especially in SharePoint 2007 where you don’t have document sets). Looking at the parameters we can use (as shown below) to identify and locate the data it would appear that passing the name of the folder to the RootFolder property would achieve this. Continue reading Displaying files from a specific folder using SPDataSource »

Written by Ari Bakker

November 21st, 2010 at 4:17 pm

Creating custom parameters for a SPDataSource

with 3 comments

The SPDataSource is a great control for retrieving data in SharePoint. You can query a single list, multiple lists/libraries or webs and bind the data to any ASP.NET data bound control such as a Repeater, ListView, GridView or DropDownList as well as the DataFormWebPart if you want to control the output using XSLT.

You can also pass in parameters for your query such as the ListName or WebUrl using the parameter classes provided by ASP.NET such as the QueryStringParameter and ControlParameter class. As these are all generic ASP.NET controls, however, there is no way of using SharePoint specific information such as properties of the current page, or information from User Profiles. For example it isn’t possible to use this on a SharePoint publishing page and use a metadata… Continue reading Creating custom parameters for a SPDataSource »

Written by Ari Bakker

August 12th, 2010 at 8:55 pm

Partial SSL SharePoint Sites – Login over HTTPS from HTTP pages

with 6 comments

This is the fourth in a series of posts detailing how to configure a partially SSL secured SharePoint site. In the previous post we covered how to secure the login page so it is always delivered via SSL. This is fine for some pages but a common requirement for many public facing SharePoint sites is to have a login form that allows users to log in from any page. By default this is not secure as HTTP pages will send these details back via HTTP (i.e. in clear text), unless we configure the page to do otherwise. This post will cover how we can cater for this scenario without having to use SSL for the entire site.

custom sharepoint login control

Written by Ari Bakker

April 6th, 2010 at 10:31 pm

Posted in Development,Security

Tagged with , , ,

SharePoint 2007 Development Tips

with 3 comments

Before getting into SharePoint 2010 I’d like to recap on some of the things I’ve learnt using SharePoint 2007. Much has progressed since I started working on SharePoint 2007 Technology Adoption Program (TAP) projects using the SharePoint 2007 Beta versions in early 2006. As a developer some of the biggest improvements I’ve noticed are the availability of tools and information.

In 2006 we were creating WSP files by manually maintaining DDF files and using makecab, a process that is now fully automatable (and integrated into Visual Studio) using freely available tools such as the brilliant WSPBuilder utility. I also remember spending two whole days trying to create a list definition as the documentation on MSDN wasn’t (and still isn’t) complete. Not surprisingly the ‘Creating a Custom SharePoint 2007 List Definition’ blog post I wrote afterwards still draws in over 1500 page views a month.

So below are a list of some of the ways I like to do things when creating custom SharePoint 2007 solutions (with a focus on Web Content Management). Continue reading SharePoint 2007 Development Tips »

Written by Ari Bakker

February 28th, 2010 at 9:47 pm

How we did it: Tag driven Information Architecture using MOSS

with 5 comments

Early last year I was involved in developing a Microsoft Office SharePoint Server (MOSS) based Intranet for the Ministry of Transport. This post explains how we utilised the tagging capabilities provided by MOSS to create this award winning Intranet. Continue reading How we did it: Tag driven Information Architecture using MOSS »

Written by Ari Bakker

January 22nd, 2008 at 9:01 am