Archive for the ‘Development’ Category
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.
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 »
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.
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.
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.
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.
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 »
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 »
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.
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 »
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 »