SharePoint 2010 at Work - Mark Miller

You may also be interested in: Build a Scalable Architecture by KnowledgeLake


2012-04-30-BookAnnouncement.pngEditor’s Note: Over the next few weeks we are running a series to introduce readers to our new book SharePoint 2010 at Work Tricks, Traps, and Bold Opinion: The Best of Each article will include a sneak peak of some of your favorite author’s chapter’s from the book.

Most people have heard the timeless parable of the six blind men trying to describe an elephant. Each man touches the elephant and, based upon the part of the body he touches, proceeds to give a definitive description of “an elephant.” None of the descriptions are correct, and yet they are all correct. Talking about SharePoint, even for those of us who have worked with it for years, is like a blind man describing an elephant. It is impossible, and yet we do it every day.

The NothingButSharePoint/EndUserSharePoint community site that I run has hundreds of contributors trying to describe the SharePoint elephant on a daily basis. They examine the beast from every angle, as a Developer, as an IT Pro, or as an End User, each with a different perspective and for different reasons. This book is a compilation of stories from the end user perspective, for those who must use and support SharePoint at their companies but don’t have access to the technical server side of the platform.

The stories in this collection were chosen because of their popularity on EndUserSharePoint. Like a blind man describing an elephant, each tale takes a different view of the platform and shows how you can use SharePoint to solve real-world business problems. The solutions and concepts have been viewed hundreds of thousands of times on the EndUserSharePoint site. The authors have used the feedback on those articles to refine their ideas, making them useful for the broadest spectrum of the SharePoint Community. The technical aspects of each of the stories have been updated to the SharePoint 2010 environment, but the concepts remain timeless and can be applied to any version of SharePoint 2007 or 2010.

The stories can be read in any order, but I suggest that everyone at least review Chapter 1 just to get an idea of where your SharePoint implementation sits on the maturity scale. From there, glance through the rest of the stories and see what you’d like to tackle first.

The SharePoint Maturity Model—Sadie Van Buren

If there is a single chapter in the book that will be useful for everyone, Chapter 1 is it. It helps you examine the entire elephant. Sadie has experience with over 50 SharePoint implementations and uses the knowledge she has gained to create a documented framework for evaluating where your company stands when it comes to getting the most value from SharePoint.

Empower the Power User—Kerri Abraham

For some reason, OneNote has never really received the recognition it deserves, nor has the internal SharePoint Power User. I use OneNote every day and know people like Kerri who can’t even imagine getting work done without it. Kerri’s story in this collection is one of the longer ones, but when you see the power of what she has done to create documentation and script management within OneNote and a SharePoint library, you might consider opening up your environment a little more to give real power to your internal SharePoint heroes.

jQuery to the Rescue—Jim Bob Howard

jQuery is that special sauce that makes everything go better with the presentation layer. Jim Bob gives us five solutions you can implement immediately without recourse to the server. Some of the solutions are jaw-dropping to people who didn’t think it was possible to do cool stuff in SharePoint. As Jim Bob says, “It’s just the tip of the iceberg.”

Unlocking the Mysteries of the SharePoint Data View Web Part XSL Tags—Marc Anderson

In this story, Marc takes a core piece of what is needed to implement presentation-layer solutions with the Data View web part (DVWP) and the XSL that drives it. It’s one of those things that hardly ever gets touched, because it seems so mysterious. With the DVWP as the main character and XSL as its sidekick, this little adventure story is the beginning of a much longer tale.

Hyperlinks in the Data View Web Part—Laura Rogers

As a professional storyteller, I like to engage the audience immediately when I’m giving a talk. One of the things I can always count on is the audience knowing the answer to the question, “Who is Queen of the Data View web part?” Laura owns that space in the mind of the SharePoint community. In this update to one of her most popular articles, she demonstrates how to create hyperlinks from existing data in SharePoint.

Building a Quote of the Day Web Part in SharePoint 2010—Waldek Mastykarz

Without exception, the Quote of the Day web part is one of the most popular downloads at EndUserSharePoint. I created it in a half hour after hearing Lori Garcia tell a story about manually updating her site each day with a new quote. Waldek saw the solution and extended it to pull the quotes from a SharePoint list instead of having them embedded in the Content Editor web part.

SPJS Charts for SharePoint—Alexander Bautz

“A picture is worth a thousand words” is a cliché for a reason. Visualization of data within SharePoint is one of the most powerful and useful aspects of the platform. Unfortunately, it’s not all that easy to do. In this story, Alexander shows us a solution that any site manager or site collection administrator can implement, even without access to the SharePoint server.

Taming the Elusive Calculated Column—Logic Functions—Dessie Lunsford

Dessie’s a funny kind of guy. I met him on the SharePointU forums when I first started working with SharePoint. He likes to go four-wheeling when he’s not cranking out stories for EUSP. The calculated column is one of the most underutilized features in SharePoint, useful for displaying inline visualization within any list or library. With his series of over 40 articles on EUSP, I think I can easily crown Dessie “King of the Calculated Column.” This story is a comprehensive step-through of the logic functions available within the calculated column.

Creating Document Libraries with Mixed Content Sources—Eric Alexander

Eric is my “go-to guy” when there’s a SharePoint issue I don’t know how to handle. As a matter of fact, Eric is the go-to guy for the thousands of people who have asked questions on our Stump the Panel Forum (STP) at EUSP, since he is the lead moderator. He has taken an interesting question from the forum, how to provide mixed content in a library, and created a solution that can be used in any version of SharePoint.

SharePoint 2010 Tab Page—Peter Allen

I first met Peter when he redid a solution I had created for formatting pages in a SharePoint wiki. In the updated solution he provides here for a tab-based interface, the fun part of the story is that he actually uses the solution to describe the solution.

A Global Navigation Solution Across Site Collections—Peter Allen

In this solution, Peter utilizes the SharePoint Web Services library created by Marc Anderson to pull information from disparate locations into a single navigation system. It is one of the most requested solutions when people have expanded beyond their first site collection and realize there is no visibility between data across domains.


There you have it. Eleven stories, each with a moral that clarifies a different piece of SharePoint. There is a second parable that is apropos for SharePoint that we have used at EndUserSharePoint. It’s the one on how to eat an elephant, but we’ll leave that to another time and place.

Note: Mark Miller is the Editor of SharePoint 2010 at Work: Tips, Tricks, and Bold Opinions by EndUserSharePoint and O’Reilly Media. Use discount MILLERSP for 40% off the print edition or 50% off of the ebook.

Workaround for People Picker Post back Bug in ASPX pages in SharePoint 2010

You may also be interested in: SharePoint Search and List Previews by Vizit


Editor’s note: Contributor Philip Stathis is a SharePoint developer at Gig Werks. Follow him @philipstathis

The People Picker is a great tool to present and validate data from SharePoint users and, indirectly, the Active Directory and is a valuable asset to any custom ASPX page.

The problem is, in all of its implementations across default SharePoint pages, the forms being used only appear on load and then get submitted. This process does only one post back. If you create a form with multiple people pickers like this one:

The user needs to be able to navigate this form while having set all these values in the people pickers and the viewstate would ordinarily be enough to handle that.

This is not the case.

NOTE: this was part of the August 2011 CU for SharePoint 2010 as can be seen here.

So if installing this CU is not an option, or this technique is applicable to you, here’s my work round:

Add this variable to your aspx page:

private static Hashtable userKeys = new Hashtable();

Next hit your Page_load logic:

protected void Page_Load(object sender, EventArgs e)
       FormLogic.RetainPeopleEditors(Page.Controls, Session.SessionID, userKeys, out userKeys);

The method being used, along with dependant code snippets can be presented below

internal static void RetainPeopleEditors(ControlCollection controls, string sessionID, Hashtable userKeys, out Hashtable output)
            ArrayList controlList = new ArrayList();
            AddControls(controls, controlList);
            foreach (PeopleEditor editor in controlList)
                string key = editor.ID + sessionID;
                if (userKeys.ContainsKey(key))
                    userKeys[key] = RetainPeople(editor, (ArrayList)userKeys[key]);
userKeys.Add(editor.ID + sessionID, RetainPeople(editor, (ArrayList)userKeys[editor.ID + sessionID]));
            output = userKeys;
private static void AddControls(ControlCollection controlCollection, ArrayList controlList)
            foreach (Control c in controlCollection)
                if (c.ID != null)
                    if (c is PeopleEditor)
                if (c.HasControls())
                    AddControls(c.Controls, controlList);
private static ArrayList RetainPeople(PeopleEditor pe, ArrayList userKey)
            ArrayList peEntities = pe.ResolvedEntities;
            if (peEntities.Count > 0)
                ArrayList entities = peEntities;
                return entities;
            else if (userKey != null)
                return userKey;
            return null;

To provide an explanation of the method, you essentially create a HashTable that remains in the memory of the page, and append the keys with a session ID to ensure uniqueness when other people access your form.

As you may have noticed, the Picker Entity element cannot be stored in session since the class is not serializable.

This workaround will essentially stop the People Editor from having to grab values from the viewstate of the page. So this method is an assisted view state for people pickers.


This article was originally posted on Gig Werks blog The SharePoint

Automated SharePoint Governance Site

You may also be interested in: Secure SharePoint with User Claims White Paper from Titus


Editor’s note: Contributor Darren Hemming is a SharePoint Consultant and Educationalist. Follow him @cariad1234

Since reading Kerri Abraham’s chapter about the SharePoint rudder in “SharePoint 2010 at Work”, I’ve been thinking about creating a template for a governance site. This would sit at the root of a site collection and help Site Collection Administrators get started with a lightweight process for documenting variations in the sites that are built. Rather than just making a (web) template with some lists in, I was also thinking about setting some sensible standard permissions on the new site. So the whole thing would be a sandbox solution that the Site Collection Administrator could upload and activate – then the site would automatically be created, branded, and secured.

Today I came across Marijn Somers’ article in EUSP about creating a SharePoint governance site, and realized that we probably now have enough of a concept to build something useful.

So I’m proposing a small community project to design and build this “Governance Site” solution. I’m happy to put it all together, but I will need some guidance from the EUSP community on exactly what to put in it. Please respond to this post with any ideas that you have. In the meantime, I will get the ball rolling with some possible structures.

Lists and libraries

  • Governance Contacts – a simple list of admins/authors/approvers for the current site collection. Site owners and members can contact them about governance questions.
  • FAQ list – common questions asked about governance, and answers from admins/approvers.
  • Governance Discussion board – a place to discuss the best approaches for authoring and collaboration e.g. “Using Dreamweaver for SharePoint navigation”?
  • Governance Plan – a wiki library describing the organization’s approach to governance. The template will have placeholders for policies for the specific organization/site collection. There may be links to governance sites at a corporate level where minutes of  governance meetings will be shared.
  • Best Practice – a wiki library providing concrete examples of customisations which are ‘safe’ e.g. adding data views via SharePoint Designer. This might include links to external articles.
  • Customisations log – a custom list where site owners can document the changes they have made outside of the standard UI. This might typically include SharePoint Designer customisations or Infopath customisations. There would be a dropdown list for the category, and some built in views. Contributors should consider this area as an opportunity to show off their work rather than a place to slavishly document each variation.
  • Announcements – describing recent/upcoming changes to governance, or new tools that are available.


I would generally make all visitors to the root of the site collection readers of all the content in the Governance site, though some of the lists would have broken away permissions and/or approval workflows.

Discussion boards, the FAQ list, and the Customisations Log would enable all (site) users to contribute to them, but not delete or edit content.

Other things

Perhaps a web part rolling up recently changed items.

Maybe one or more advanced search web parts making it really easy to find examples of best practice or supported customisations.

The site would automatically inherit the master page and theme of the site collection’s root site.

What to do next?

Please just post what you think. What’s missing? Which parts of the above proposal won’t work? Once we have some kind of consensus about the right structures, I’ll build the template.

Regards, Darren.

SharePoint and HTML5 - Part 2: HTML5 and Mobile

You may also be interested in: the only cloud-based Dev/Test solution for SharePoint by CloudShare


Editor’s note: Contributor Fernando Hunth is a SharePoint Architect and Nintex consultant at Baufest. Follow him @fhunth

Every new subject on HTML5 is a new world and HTML5 Mobile is no exception.

There are lots of resources where you can learn about Mobile on HTML5, in detail. You can find several resources here:

HTML5 on mobile is basically covered by all the attributes seen in my first article but during the design and building phase we must consider the browser where we want to work our feature.

Here is a compatibility table based on HTML5 features versus browser.

HTML5 Compatibility on Mobile browsers

Let’s view a sample of a simple HTML5 page hosted on a Sharepoint Library

One of the elements that we mentioned in the first article was the new Input Type Attribute.

					<label for='fullName'>Full Name</label>
					<input type='text' id='fullName' placeholder='Fernando Hunth' required />
					<label for='twitterUserName'>Twitter User Name</label>
					<input type="text" id="twitterUserName" placeholder="fhunth" />
					<label for='phoneNumber'>Phone Number</label>
					<input type='tel' id='phoneNumber' placeholder='(xxx) xxx-xxxx' />
					<label for='age'>Age</label>
					<input type="number" id="age" placeholder="40" />
					<label for='email'>Email</label>
					<input type="email" id="email" placeholder="" />
					<label for='url'>URL</label>
					<input type="url" id="url" placeholder="" />

Here is part of the sample code where you can see the use of the type attribute in the INPUT tag. If you browse the sample you can see that the email field is validated because it has been set as email on the type attribute.

In this case the whole html5 page is hosted in a Sharepoint library as an .aspx page file.

Here is a live sample that shows a contact page (Open it with Chrome).

Mobile View

In the next article we’ll try to submit this information to a Sharepoint List.

Sometimes we need to build simple HTML5 features in a Sharepoint site which will be useful for us.

We can also find some cool products that solve more complex functionalities in Mobile for Sharepoint, like

Thanks for reading.

See you for the next article.

Brand SharePoint: Global Navigation - The Journey Begins (Part 3)

You may also be interested in: SharePoint Solutions In-A-Box from Alcero


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Groupe GSoft Inc. Follow him @bniaulin

Update: Benjamin has posted a video walk through to help visualize the process​.

On my quest to Brand my Global Navigation in SharePoint, I started by identifying the safest way to test my branding experiments. We refreshed our CSS knowledge and got familiar with new techniques when we decided to Brand our SharePoint. I feel like we are ready to start giving a little life to the SharePoint Global Navigation.

Previously, when testing the Content Editor Web Part to apply branding to a single page as a test, I applied the following code.

        DIV #s4-topheader2  {


The result was:

Seeking the reason

So why did it work? Well think of it this way, the SharePoint site you are looking at is basically an HTML page if you want. This means that there is a bunch of code like “DIV, SPAN, P, A, H1, H2, TABLE” and more. Each section that uses code like this can also have a style applied to it, this we called CSS. So when my code above said DIV #s4-topheader2 it meant that I wanted to apply some style to a DIV which was identified as s4-topheader2. Great, but how did I know that SharePoint used that for the Global Navigation container? Well I took it from that CSS Chart mentioned in my previous post by jumping to the Global Navigation section.

So which one should we use?

Good question, here are the Global Navigation classes that are used:

.menu ul
.menu li

.s4-tn li.static > a:hover


Wow. That’s a lot of classes to memorize. Let us start by looking at the classes that start with “s4” but that don’t have complicated code written next to them. That leaves us with:


That’s only three, much better for us!

Let’s find out together

Ok so we already found out, through our Content Editor Web Part test, that #s4-topheader2 applies to the entire container that holds the Global Navigation at the top. That’s why our navigation currently looks like the image above, with a dark grey background.

So let’s see what .s4-toplinks does. If you are curious to know where a class is being applied by SharePoint, a common practice is to set a flashy background or border to find out. Let’s do that!

I am going to change the CSS we placed in the Content Editor Web Part earlier to add .s4-toplinks and make the background yellow:

DIV #s4-topheader2 {
.s4-toplinks {
background-color: yellow;


And now, let’s see what .s4-tn does by doing the same but with a red background:

DIV #s4-topheader2 {
.s4-toplinks {
background-color: yellow;
.s4-tn {
background-color: red;

Notice what happened? The yellow background is gone!?

Well it’s not gone, it’s simply hiding beneath the red one.

*Note* so far, the Dark Grey, Yellow and red backgrounds extend all the way to the right of the Global Navigation.

Understanding what happened

Look at it this way; the Global Navigation has items sitting one on top of each other.

This means that .s4-tn is on top of .s4-toplinks who’s on top of #s4-topheader2.

Let’s move .s4-tn to the right a bit to better understand. I changed the .s4-tn part of my CSS to position it 150px to the right:

.s4-tn {
background-color: red;


Now that we understand the top three containers used by the Global Navigation in SharePoint, this means that in the next article we will be ready to start applying some Real World colors!

Editor’s Note: Benjamin is working on a video for this solution which will be available soon.

Brand SharePoint Series:

Making Sense of HTML5 with SharePoint: Internet Explorer 9 Capabilities

You may also be interested in: SharePoint Smart Notifications by KWizCom


Editor’s note: Contributor Marc D Anderson is the Co-Founder and President of Sympraxis Consulting LLC. Follow him @sympmarc

Let’s take as a sort of given that the majority of people who use SharePoint, at least for Intranets, are using Internet Explorer. I know that’s a big assumption, and in most organizations it’s not fully true. Many people choose to go rogue from the standards and use other browsers, most front end developers refuse to use IE, etc.

So why make the assumption, you might ask? Well, I want to focus first on the HTML5 capabilities that organizations that use SharePoint can reasonably expect to use. Knowing that the majority of real users (maybe not the people reading this article) use IE as their browser means that our palette is somewhat limited. The fact that many users out there in the real world are still using IE8, IE7, or yes, even IE6 makes it even worse.

So let’s go with the using IE assumption, but allow that the version is IE9. Without that, this HTML5 stuff is all pipe dreams and smoke. When I I use the IE Developer Tools to set IE9 to IE7 or IE8 modes, I get a measly 42 / 500 points at the HTML5Test site. It’s hardly worth bothering with HTML5 goodness at that point. The HTML5Please site takes a different slant and gives a good,. clear overview of the capabilities of the different levels of IE. Without IE9, not so much. When can I use… shows every single HTML5 capability in tables for each browser level. The point is, there’s lots of information out there about what we should use, use with assistance like shims or shivs, use with fallbacks, or avoid. There’s no real excuse for developing something that won’t work with a known browser base.

So let’s look at the major cool HTML5 stuff that we can do if our users are on IE9, taking the majority of the information from looking across the sites mentioned above. I captured the images (yes, they are just images – no interactivity) from the HTML5Rocks Playground.


Elements give us ways to prepare our content to live out on the Semantic Web. For us SharePointilists building internally focused applications it may be of less interest, but over time as content gets wrapped in these elements, we’ll be able to more easily reuse and redisplay content in different contexts.


Canvas may be the HTML5 capability that has the most people excited. Canvas gives us a container into which we can add graphics on the fly using script. ‘Nuff sed on this one for now. I’ll show some cool demos later.


Everyone loves a good video player, and HTML5 makes it oh-so-easy. Well, sort of. There are some odd inconsistencies due to the different standard which different browsers support, but remember that we’re focused on IE here, at least for now. We get a nice video player without any plug-ins or add-ons. See for demos and examples.


Similar to the video player, we get an easy to use audio player. It’s basically the same thing from the user standpoint – it looks like the video player, but without the video part – but the way we set things up is a little bit different (but still really easy).

Now What?

So, that looks like a pretty short list, doesn’t it? Unfortunately, it is. The more I dig into this HTML5 stuff, the more I feel that while HTML5 as a standard contains a lot of great stuff, the browsers just aren’t there yet. Or they are too inconsistent for us to reliably build HTML5-based capabilities without using a lot of shimming.

But it’s not all bad. In the next set of articles in the series, I’ll show you how to take advantage of the capabilities above and then get into some of the others that you can use with the appropriate shims and fallbacks.

SharePoint 2010 Document Management - Part 5

You may also be interested in: SharePoint training by SharePoint911


Editor’s note: Contributor Jasper Oosterveld is a SharePoint Consultant at Wortell. Follow him @SharePTJasper

In this part of my Document Management series I would like to talk about versioning. Every list and library in SharePoint can use versioning. I will focus on the document library for this article.

Versioning will not automatically be enabled for a document library. To enable this feature you have to:

  • Select the library
  • Click in the ribbon at Library and Library Settings
  • Click at Versioning settings

You are now presented with the configuration screen for versioning. You have to make a couple decisions:

  1. Do I want to only save published versions or drafts also?
  2. How many versions do I want to save?
  3. Is everyone allowed to read the drafts?
  4. Do I want my users to check out a document before editing?

That’s it! But these are important questions, so keep on reading:

Type of version

There are two type of versions available:

  1. Major
  2. Draft

You have to make the decision if you want to work with major (1.0, 2.0, 3.0) versions or allow your users the create drafts (1.1, 1.2, 1.3).

Amount of versions

Don’t forget to set a limit as to the amount of versions because every version will be saved in the database. This means that a 10 MB document with 10 versions will take up 100 MB in the database. This can grow fast!

Readers and drafts

The cool thing about working with drafts is that you can work on a document and publish it when it’s finished. All the users with read permissions can now view the new version. This is a great feature in project sites because the project members can keep working on a document while the other users can only view the previously published version.

Check in / out

You should turn on this feature so users are obligated to check out a document. Also enable the Checked out to column in the view of the library. Every time a document is modified other users can see which users is modifying the document.

You are now set to use the versioning feature! Every time the document is checked out and changed the user has to check in the document and gets the following options:

The user has to select the version type (major or draft) and if the document needs to be checked out again after checking in. Don’t forget to tell your users to use the Comments box to give a short overview of the changes they made.

There is an important aspect you need to remember. It is not possible, through SharePoint, to view the actual changes made inside the document! There is an option in Word to do this so check that out.

At any time it is possible to see the version history of a document. Just enable the drop down menu and click Version History:

All the previous versions are displayed. You are now able to restore previous versions. Just enable the drop down menu at the date and time field and choose restore. This version will be restored and set as a new version (for example 2.1 or 3.). You can always view the document itself by clicking on the date and time. The document will open in the Office client application.

Tips and tricks

The amount of versions
Please don’t forget that every version will be saved in the database! As mentioned before, a 10 MB document with 10 versions will take up 100 MB in your database. See if you can delete previous versions from time to time.

The changes made to the document
It is not possible to get an overview of the changes made in the document itself. You have to use the features of Microsoft Office. Please advise your users to use the comment box after creating a new version.

Co-authoring and check in/out
In the first part of this series I talked about co-authoring in Word. This will not be possible if the check in/out option is enabled.

SharePoint: Learn to Brand from the Start (Part 2)

You may also be interested in: O’Reilly - SharePoint 2010 at Work


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Groupe GSoft Inc. Follow him @bniaulin

Author’s note: I’d like to add that this method of adding CSS by Content Editor Web Part is purely for testing. In coming articles we will see how to add CSS using best practices, but for now we’re keeping it simple.

Update: Benjamin has posted a video walk through to help visualize the process​.

Small Beginnings

I set myself on a quest to change the Global Navigation or Top Links Bar of my SharePoint 2010 Team Site. That is the horizontal bar at the top of your SharePoint where new sites you create typically go. Like any good SharePoint branding beginner, I started by looking online for help and searched popular books about branding. The first book I read started talking about Master Pages, Page Layouts and other concepts, this is way too complex – I need something for a beginner. Online documentation was the same with articles like “Edit your Master Page to add a Megadropdown menu with jquery”.

If you remember my previous post “Brand your SharePoint?”, I mentioned that I am neither a developer nor a graphic designer; knowing only some very basic CSS and having a strong will to BRAND my SharePoint. So where should I start? During my online research I came across this CSS Chart that, for a given location, will tell me which CSS classes are used. From my reading of 5 Steps to Drastically Improve Your CSS Knowledge in 24 Hours a CSS Class is a way for me to set “design settings” that can be used in html. If you haven’t read this article yet, I strongly recommend you do before we get deeper into branding SharePoint in the coming weeks.

I thought to myself “Jackpot! CSS Chart”, but soon I realized I did not know what to do with this.

Starting Safely

Before adjusting the look and feel of our SharePoint, we need to make sure that any changes we make will not have a disastrous affect on our SharePoint Server. The idea is to safely test and apply changes while limiting any possible collateral damage. For this, we have an easy solution, the Content Editor Web Part. The Content Editor will allow someone to write code that will only be applied if someone visits the page on which it was added. What does this mean exactly? Well if we change the colors of hyperlinks for example, by adding our changes in the Content Editor’s HTML editor, it will only affect the page we are on.

Adding the Content Editor Web Part can be done in 6 easy steps:

  1. Click on Edit Page
  2. In the Ribbon, select Insert, then Web Part
  3. Find and add the Content Editor Web Part under the Media and Content category
  4. Make sure you are inside the Content Editor Web Part by clicking on the “Click here to add new content” link inside the web part or by just clicking inside of it.
  5. In the Format Text tab of the ribbon, select HTML as shown below then Edit HTML Source
  6. You should get a blank HTML Source Editor popup

Step by Step details with pictures are available here: How to edit source in Content Editor Web Part in SharePoint 2010

Small beginnings

Although my goal is to change the Global Navigation in SharePoint from this:


To something, a little more like this:


Or even:


I will first need to make sure that editing in the Content Editor works the way I intended it to. I added the Content Editor Web Part using the 6 easy steps mentioned above. I’ve also added the following CSS to change the color of the Global Navigation:

        DIV #s4-topheader2  {

**The padding is to add a little space above and below my Navigation bar**

I think we are on to something here.


Following up

Why did I use DIV #s4-topheader2 in my code? What does it mean?

In my next article I’ll search for the answer to that question by exposing the Global Navigation to you.

Brand SharePoint Series:

Use SPServices to Get Recurring Events as Distinct Items

You may also be interested in: SharePoint Hosting by


Editor’s note: Contributor Jim Bob Howard is a Senior Solutions Engineer at Juniper Strategy. Follow him @jbhoward

There are reasons why you might want to get distinct calendar events, rather than leaving all of the grunt work to a Calendar list. If you’re working in the front-end, of course, SPServices is the way to go. But, how to get what you want isn’t exactly clear without a lot of trial and error. I’ve already done that, so you can build from what I’ve learned.

Assumptions: You’ve worked with SPServices ( If not, spend some time getting to know this incredible, revolutionary library before attempting the following.

Using GetListItems
In SPServices, when we want to pull data from a list, we use GetListItems, and this situation is no different. It will look very much like this:

    operation: "GetListItems",
    async: false,
    listName: "My Calendar",

Next come three object properties: CAMLViewFields, CAMLQuery, and the less-often used CAMLQueryOptions. Let’s start with the CAMLQueryOptions, since that’s probably new to most people.

If you don’t add the right CAMLQueryOptions and don’t include specific nodes to the CAMLViewFields and CAMLQuery, recurring dates will be returned as a single item with an EventDate ("Start Date") of the start date/time of the first occurrence, and an EndDate ("End Date") of the end date/time of the last occurrence. This will have the effect of making the recurring event be one long, multi-date event.


In the CAML, we have to pass the QueryOptions to get all Recurring Events to be returned as individual instance nodes, including those in an "older" [e.g. v3] format. (Yes, in SharePoint, some [not all, mind you] of the events you create will actually be in the v3 format.) We also need the RecurrenceData and fRecurrence fields returned in order to get everything we need.

We get all of the above by including the QueryOptions node in the CAMLQueryOptions property:

CAMLQueryOptions: "<QueryOptions>" +
        // Query Options

The query options we need to add are:
CalendarDate (optional, if only looking at [Today]): set to a start date, explained below;
RecurrencePatternXMLVersion: set to ‘v3′ to get the "older" format mentioned above, and
ExpandRecurrence: set to "TRUE," meaning that we want them expanded

So our CAMLQueryOptions now looks like this:

CAMLQueryOptions: "<QueryOptions>" +
        "<CalendarDate>" + startDate + "</CalendarDate>" +
        "<RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>" +
        "<ExpandRecurrence>TRUE</ExpandRecurrence>" +

(We’ll look at the startDate variable below when we discuss how the dates overlap.)


The above Query Options will only return expanded recurrences if you also include fRecurrence and RecurrenceData in your ViewFields:

CAMLViewFields: "<ViewFields>" +
        "<FieldRef Name='Title' />" +
        "<FieldRef Name='EventDate' />" +
        "<FieldRef Name='EndDate' />" +
        "<FieldRef Name='Location' />" +
        "<FieldRef Name='Description' />" +
        "<FieldRef Name='fRecurrence' />" +
        "<FieldRef Name='RecurrenceData' />" +
        "<FieldRef Name='fAllDayEvent' />" +

In the above, the EventDate is the same as the Start Date. If calendar data is not expanded, this will be the starting date/time of the first occurrence, and the EndDate will be ending date/time of the last occurrence. That’s obviously not what we want, which is why we’re expanding the recurrence data.

NOTE: If you leave out the fRecurrence and RecurrenceData from the ViewFields, even if you include the CAMLQueryOptions listed above, recurring dates will not be expanded.


Now, here comes the meat of the CAML Query… and some unexpected behavior.

When pulling recurrent dates, you’ll most likely want to get a range of dates, say for a month, a year, or maybe just the events for Today. So, of course, we tell CAML (like SQL) what range we want in the WHERE clause, using the DateRangesOverlap node, like the following:

CAMLQuery: "<Query>" +
        "<Where>" +
            "<DateRangesOverlap>" +
                "<FieldRef Name='EventDate' />" +
                "<FieldRef Name='EndDate' />" +
                "<FieldRef Name='RecurrenceID' />" +
                "<Value Type='DateTime'>" +
                    "<Month />" +
                "</Value>" +
            "</DateRangesOverlap>" +
        "</Where>" +
        "<OrderBy>" +
            "<FieldRef Name='EventDate' />" +
        "</OrderBy>" +

Within the DateRangesOverlap node, the RecurrenceID FieldRef tells which occurrence item in the recurring sequence that we’re dealing with. Again, if this FieldRef isn’t included, the expansion doesn’t work correctly.

DateRangesOverlap Value Type

I don’t know if any back-end developers have run into this same issue when working with the SPQuery to pull expanded recurrence date, but from here, not all DateRangesOverlap Value types work the way they should. And they’re cryptically-documented, where mentioned at all. The basics are that you can return dates that "overlap" a given scenario. The overlapping varies depending on scenario, as follows:

<Year />
This is supposed to get all events within:
(a) Today’s year (if no CalendarDate is passed), or
(b) the date passed in QueryOptions as CalendarDate.
Actually, it returns all dates from [Today] into the future. It ignores:
(a) the CalendarDate, and
(b) the end of the current year

<Month />
Performs consistently as expected, with the exception that its definition of "month" is more of a "month view." A month view consists of all of the weeks which contain days in that month. In other words, the month view for May 2012 begins on April 29, 2012, because May 1 is on a Tuesday and the "month view" consists of full weeks. Likewise, the May 2012 month view ends on June 5, 2012. This means that pulling all of the dates for May 2012 will return all events for April 29 - June 5.

However, even though April 29 is the beginning of the May month view, when passed as the CalendarDate, it will return the April month view. See below for how this affects date calculations based on pulling data for a given month.

<Week />
Performs exactly like <Month />, but only returns the corresponding week for:
(a) Today, or
(b) CalendarDate

<Today />
Returns just the events for Today.

<Now />
Contrary to most documentation, <Now /> doesn’t "work" but rather defaults to the same results as <Year />.

In fact, <Year /> is the default. If you leave off the entire WHERE clause, but include the RecurrenceDate and fRecurrence fields and the QueryOptions (CalendarDate will be ignored), you get the same results as <Year />.


In QueryOptions, if the CalendarDate is set, it needs the date to be a string in the format:

In most cases, setting the CalendarDatewhen needed) to the real date on which you want to base your range will work just fine, as long as you set the time in the Z-notation to noon. The reason for the noontime setting is to make allowance for all-day events within the given range. These tend to get messed up when viewing is based on a midnight or early morning time. Basing the range on noon alleviates the issue. (At least it does for US time zones; I confess that I haven’t tested them all.)


Putting all of the above together, here is a complete block of code that pulls the dates for a month range.

var startDate = "2012-05-12T12:00:00Z"; // Our example will show the month of May 2012
    operation: "GetListItems",
    async: false,
    listName: "My Calendar",
    CAMLViewFields: "<ViewFields>" +
            "<FieldRef Name='Title' />" +
            "<FieldRef Name='EventDate' />" +
            "<FieldRef Name='EndDate' />" +
            "<FieldRef Name='Location' />" +
            "<FieldRef Name='Description' />" +
            "<FieldRef Name='fRecurrence' />" +
            "<FieldRef Name='RecurrenceData' />" +
            "<FieldRef Name='fAllDayEvent' />" +
    CAMLQuery: "<Query>" +
            "<Where>" +
                "<DateRangesOverlap>" +
                    "<FieldRef Name='EventDate' />" +
                    "<FieldRef Name='EndDate' />" +
                    "<FieldRef Name='RecurrenceID' />" +
                    "<Value Type='DateTime'>" +
                        "<Month />" +
                    "</Value>" +
                "</DateRangesOverlap>" +
            "</Where>" +
            "<OrderBy>" +
                "<FieldRef Name='EventDate' />" +
            "</OrderBy>" +
    CAMLQueryOptions: "<QueryOptions>" +
            "<CalendarDate>" + startDate + "</CalendarDate>" +
            "<RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>" +
            "<ExpandRecurrence>TRUE</ExpandRecurrence>" +
    completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode("z:row").each(function() {
            var $node = $(this),
                fADE = $node.attr("ows_fAllDayEvent") || 0,
                thisADE = (fADE == 0),
                thisID = $node.attr("ows_ID"),
                sepID = thisID.indexOf(';#'),
                thisTitle = $node.attr("ows_Title"),
                thisRecurrence = $node.attr("ows_fRecurrence"),
                thisDesc = $node.attr("ows_Description");
            if (sepID != -1) thisID = thisID.substring(0,sepID);
            var thisUrl = "DispForm.aspx?ID=" + thisID,
                thisClass = thisTitle.replace(" ","").substr(0,10).replace(",","").replace(" ","") + thisID,
                thisRD = $node.attr("ows_RecurrenceData");                                                        
            // if working with FullCalendar or building an events object for another purpose...
                title: thisTitle,
                start: $node.attr("ows_EventDate"),
                end: $node.attr("ows_EndDate"),
                allDay: thisADE,
                url: thisUrl,
                description: $(thisDesc).text()


Side bar note if you’re working with the FullCalendar library:


The events function in the FullCalendar library gets the true month view start date for start and the true month view end date for end (e.g. for May 2012, start = "April 29, 2012" and end = "June 5, 2012). As stated in the article, passing April 29 for the CalendarDate when looking at a <Month /> will yield the dates for April 2012 (April 1 - May 5).
So we’ll need to do some calculations to pass the correct date value to CalendarDate.

var startDate = start.getYear() + '-', // returns the year as YYYY
    monthAdj = 1, // for adjusting the month, if needed
    dayAdj = 0; // for adjusting the day, if needed

Since start is the beginning of the month view, it will either be the 1st of this month or within the last week of the previous month. Therefore, if it’s over 10, we know our view is starting in the previous month: we’ll add an extra month to our calculations, and subtract 10 days. So, if start is 4/29, we’ll make it 5/19 to make sure it’s fully in the month we want to view.

if(start.getDate()*1 > 10) { monthAdj++; dayAdj = -10 };

getMonth() returns the zero-based number of the month with no leading zeroes, so we’ll add 1 at least, but will add 2 if our view starts the previous month. And if it’s < 10, we’ll add a leading ‘0’ to the string.

if((start.getMonth()*1+monthAdj) < 10) {startDate += "0";}
startDate += (start.getMonth()*1+monthAdj) + '-';

getDate() returns the number of the days with no leading zeroes, so if it’s < 10 we’ll add a leading ‘0’

if (start.getDate()*1 < 10) {startDate += "0";}

For good measure we’ll set the time at noon to ensure we’re fully into the day we’re basing things on

startDate += (start.getDate()*1+dayAdj) + "T12:00:00Z";

Use this startDate in the code provided in the accompanying article.


Note: Jim Bob is a featured author in SharePoint 2010 at Work: Tips, Tricks, and Bold Opinions by EndUserSharePoint and O’Reilly Media. Use discount MILLERSP for 40% off the print edition or 50% off of the ebook.

SharePoint Conference.ORG 2012 Celebrates Five Years!

You may also be interested in: The SharePoint Shepherd’s Guide for End Users from SharePoint Shepherd


Editor’s note: Contributor Bonnie J. Surma is a SharePoint community evangelist, sponsor manager for, advertising and services for, SharePoint end user support consultant for TCSC, Midlothian, Virginia. Follow her @sharepointmom.

What better way to end the month of April than celebrating the 5th year of SharePoint Conference .ORG in Reston, Virginia! Not heard of this conference? It’s definitely on the list of “must attends.” What began as a regional conference, dedicated to associations, nonprofits, and education and staffed mostly with SusQtech SharePoint professionals, has now become a full-scale, international conference welcoming approximately 300 attendees from around the United States and several different countries.

SusQtech knows firsthand the unique needs of their clients in nonprofits, education, and government, and they thought it was really important to have a conference that focused exclusively on their needs and interests.

Not only is SharePoint Conference .ORG unique because of its audience, the session content is geared specifically for business, content, and design users, but they also reach the technical crowd. The team observed that more and more of the SharePoint events had shifted their focus with the vast majority of sessions geared toward SharePoint developers and administrators. SusQtech noticed that a growing number of the conference attendees are executives interested in SharePoint from a strategic business perspective.

“There’s just something wonderful about our attendees! We go out of our way to create no-pressure social and networking events (like the Sunday Welcome Reception and the Monday Conference Dinner) to make everyone feel comfortable – and the atmosphere at the event is always extremely relaxed and supportive. This year, one of our favorite SharePoint speakers, Pete Serzo, is even doing an entire lunch session playing the piano. The session’s entitled “Oh the SharePoint Places We Will Go…” and we’re all really looking forward to it,” states Rob Hustick, president of SusQtech.

Looking back over the successful conference years, the speaker roster has grown from a mostly SusQtech staff to now going great lengths to identify the best SharePoint speakers from around the country to speak on all things SharePoint. The conference has truly become one relevant to the greater SharePoint community. They’ve broken the conference session agenda into four separate tracks, based on direct feedback they received from attendees: Technical, Business, Content / Design, and Products / Add-Ons. As the conference has grown in size and notoriety, they’ve also found that SharePoint MVPs and experts from around the country reach out to them throughout the year with session ideas.

For me, SharePoint Conference .ORG will always remain on the top of my list of conferences. It was the very first conference I attended in 2008 and the value I gained at this conference was more than many conferences I attend today. They truly spoke my language and the attendees were all there for reasons beyond themselves. SusQtech knows this. They work on a day-to-day basis with SharePoint professionals who are involved in organizations that are mission critical or saving lives or saving the planet or educating our children and much, much more. I recommend this conference all the time because I know first-hand that it truly adds value to you, to your business/company/organization, and to the entire world.

In tracking this conference it’s always been interesting to me of their keynote choices. Rob states, “Our objective has always been to identify and recruit the speakers with the most relevant message for our specific audience. Last year we chose Kristina Halvorson, a noted content expert. The year before we chose David Linthicum who spoke about the Cloud. Neither speaker was a SharePoint expert – but I’d like to believe that both were able to effectively challenge our attendees to think in larger conceptual terms about where our industry is going and how they can prepare their own organizations for the journey.”

Hustick continues, “We chose this year’s speaker, Holly Ross , the executive director of NTEN, after viewing literally hundreds of candidate videos. Holly’s been recognized as one of the Nonprofit Times Power and Influence Top 50 three times, in 2009, 2010 and 2011 and she was recommended to us by many of last year’s attendees. We’re extremely excited to have her join us this year.”

SharePoint Conference .ORG begins on Sunday, April 29, with an all-day “SharePoint UI Essentials Workshop” and evening welcome reception with the main conference beginning bright and early Monday morning, April 30. If you’re not registered for this year, you’ll want to add it to your calendar for years to come. You’ll be joining people who are using or building solutions on the SharePoint platform that can support feeding the hungry, support our troops, change lives, and make a difference. Even if you are in the business sector, the value you will gain at this conference is priceless.

Thanks to Rob Hustick and the SusQtech team for their passion and dedication. Check out all conference information at For more information about SusQtech, visit them at