Archive for the “Development and Customization” Category

How to Hide Publishing Site Actions Menu Links

July 15 2010 103 comments

One of our clients requested us to customize SharePoint in a way that we needed to hide/replace SharePoint Site Actions menu’s New Page -link. Well, at first we thought that this is easy task to do, but it wasn’t – until we figured out how to do it.

We googled a little bit, and found this thread:

Read more »

SharePoint 2010 – Setting DefaultPageLayout Programmatically

July 1 2010 38 comments

PublishingWeb has a DefaultPageLayout-property which contains information of the page layout to use when you select New Page from Site Actions. The property is readonly as you can see from msdn.

However – PublishingWeb has a method SetDefaultPageLayout which gives you the way to change the default page layout programmatically. Definition is found from

Read more »

PowerShell Tip: Searching for Controls Without a Fully-qualified Type Name

May 28 2010 One comment

Today’s post is a quick tip. I’m working with some older code where a lot of the ascx files don’t have a fully qualified type name in the Inherits attribute of the Control directive. I wanted to find them without having to open dozens of files and manually search for offenders:

function Find-Controls-Without-PublicKeyToken([string]$directory) {

Read more »

Extending PowerShell for SharePoint with Custom Commandlets

May 5 2010 2 comments

In my previous entry on SharePoint and PowerShell I promised I’d show you how to implement custom commandlets for Master Page manipulation. SharePoint 2010 ships with a wide array of commandlets, but none of them seem applicable here. This should also serve as a nice generic example on how to implement simple commandlets.

In order to…

Read more »

Single Page Layout for Several Content Types

April 21 2010 11 comments

Just recently we came across a case where we needed to share a single page layout between three different content types. The visible meta data fields for all three content types were the same, and creating several identical page layouts felt wrong. Fortunately, SharePoint supports the scenario. Less fortunately, the documentation is a little sparse.

For a…

Read more »

Using EditorParts for Dynamic/Data Driven WebPart Editors

April 14 2010 8 comments

Having worked with Sharepoint for a few months now I’ve been overwhelmed by the endless amount of XML I’ve had to type in just to package a simple feature to a deployable wsp. And also by the fact that I’m now spending significantly less time writing c# code that I’ve gotten so accustomed to working with. In fact, there seems…

Read more »
Page 4 of 6« First...23456