Allow Readers to View Unpublished Pages

I believe this is something that will most likely come up for most organizations using the approval process on SharePoint publishing sites. I had a requirement from one of my client to allow users that have read-only permissions to be able to view unpublished versions of pages. These users would only get read access to them, they won’t be able to edit or approve any of its content. This may sound fairly easy to begin with, but you need to make sure you follow the proper steps in configuring the access, otherwise the users will be presented with an old version of the page, or worst a 403 access denied page. The following process explains how you can setup each publishing site within your organization to allow read access to draft pages.

Step 1 – Add the Users to the Visitors Group

By default, the visitors group will get Read access. You need to make sure the users you want to grant read access to your draft pages are in that group.

Step 2 – Enable Minor (Draft) Version of Pages

Sounds trivial, but in order for people to view drafts, you need to activate the drafts functionality within your pages library. By default, you are given 3 options under the Versioning Settings for a specific Document Library: “No Versioning”, “Create Major Versions”, or “create major and minor (draft) versions”. The 3rd option is what you want.


Step 3 – Allow all Authorized Users to View Draft Items

By authorized users, we mean users having the Read right or higher. In the Draft Item Security section of the Versioning Settings page, make sure you select “Any user who can read items”. This is probably the main reason why things don’t work. People always forget to turn this on.

Step 4 – Submit your Drafts

Step 1 to 3 above let you configure your site to allow Read-only users to view drafts, however, as a publisher, you need to make sure the page you want them to view is Checked-in. If the page is not checked-in, then you are the only one being able to view the changes. By checking your page in, SharePoint will let you know in the notification area that the page is visible by authorized users.

The only down side of the approach described here, is that this configuration has to be repeated to every site where you want Readers to view drafts.

Reusable Content

Where I work at, I’m in charge of maintaining the Technical aspect of our public facing SharePoint site. The content of the site is created by a separate team that does not have anyone with any HTML skillset. No need to mention to you that the WCM “What You See Is What You Get” editor is front and center to their work. As their IT contact, my job is to make their life as easy as possible, while ensuring they produce HTML compliant content. One of the coolest tricks I like to use, is to produce Reusable Content snippets for them. This blog post explains how you can create your own snippets for publishing sites.


What is it Anyway?

First off, what is the Reusable Content feature in SharePoint? It basically is a list in every Publishing site that contains pieces of valid HTML that can be easily reused in various pages. These snippets can be made available through a button in the ribbon bar:

As you can see in the example above, I’ve created two custom Reusable blocks, Top of Page and Haut de la page. These HTML pieces, simply insert an anchor link floating right on the page and that links back to the top of the current page.

Add New Snippets

If you want to go and add new snippets, the easiest way for you to achieve this is through the Ribbon. In the picture above, under my two custom snippets, you see the option “More Choices…”. Click on it.

The Reusable Content Dialog will appear. In the top left corner, click on “Open List

A second popup will appear and you will be brought to the Reusable Content List. To add a new item to that list, click on “Add new item

On the new item dialog, fill in the appropriate information.

The two things to watch out for are the “Automatic Update” and “Show in drop-down menu” checkboxes. The first one is where the reusable content idea takes all of its sense. By checking this option you basically say to SharePoint that when selected, this snippet should insert a reference to the reusable content object. Meaning that if you decide to change it later on, all pages that are using it, will automatically see their content updated. In my example above, assuming I change title and want my signature to be updated on all of my pages at once when I modify it, all I have to do is to keep the check box checked. However, if I want every page to have a static copy of my signature, so that when I change it, only the new pages have the new info, I would uncheck it. This will then inject the HTML directly in the page instead of just a reference to my Static Content object. The second check box allows you to have your new snippet shown directly under the ribbon’s button (see Picture #1 or #2). If you decided not to enable this option, your snippet will still be accessible in the Reusable Content dialog window (see picture #3).

Now that our custom Reusable Content Snippet has been created, now’s the time to go and play with it. Simply open a new publishing page in edit mode, and navigate to the Reusable Content menu. Click on the button and select your newly created snippet…Voilà!

Two things to watch out for. First one, is the HTML code, you’ll actually need to use the HTML control from the editor to insert HTML code in your snippet. The second one, is that in order for your users to be able to use your snippets, they’ll need to be individually approved in the Reusable Content list before being visible by all.