August 2, 2012 7 Comments
The other day I blogged about the new WCM functionality in SharePoint 2013. If you haven’t read the post it basically talks about all the powerful new functionality that’s available with WCM in SP2013 because it’ll use search to drive content management. In this post I’m going to start getting into a bit more detail about what’s required to start actually using the new WCM functionality. I’ve been searching around on the interwebs and haven’t really seem much information from Microsoft yet — although I’m sure it’s coming. For anyone looking to get a jump start hopefully this will help.
I’m going to try to keep this out of the weeds with respect to the architecture that’s behind the scenes driving all of the functionality. The follow describe the major pieces that are working together to make the new WCM functionality tick:
- Product Catalog — You can think of this as almost a published list or library. Unlike content from SP2010 which was usually entered into pages via page layouts, we are just talking about fields that get filled out — just data pretty much. Creating this first piece is going to be the subject of this post.
- Managed Metadata — This feature was introduced in SP2010 and then improved and expanded for SharePoint Server 2013. It still is where you’ll setup your enterprise taxonomy for your data but there’s additional functionality now that can be used to drive navigation as well as some other WCM goodness which I’ll cover in another post.
- Search — There’s tons to discuss here, but for right now the important takeaway is that as you work more with the new WCM features you’ll spend a lot of time dealing with search. If you aren’t too familiar with search, there can be some gotchas you’ll run into. I’ll point a few out in this post.
- Page Templates — Not to be confused with Page Layouts, page templates are a single page that dynamically renders content. In this way we can have a single page for all of the items coming from our catalog — the single page will show the different items from our catalog depending on what information is passed back. In other words, we need one page to render lots of content. Page Layouts still exist, but managing content with the new WCM functionality will mean you’ll be working with the page templates. Yet another topic for another post…
- Display Templates – This is the primary way to style the results from the Content By Search (CBS). In SP2010 designers working with a WCM site needed to customize the ItemStyle.xsl to control the way results came back for the CQWP. Display templates are the way you’d style the results from the CBS — I don’t expect to get too deep into this. I’ll leave that to my good friend Randy Drisgill — be sure to keep an eye on his blog.
I’m sure there’s more I’m forgetting about, but the there’s going to be plenty of time to fill in the gaps. The goal here is to just get you started with the basics. On that note — let’s start at the beginning and walk through the steps for creating a simple catalog.
1– The first step in the process is to Create a site collection using the Project Catalog template. To do this open up Central Admin and from Application Managed click the link to Create Site Collection. From here you’ll want to click on the Publishing tab and choose the option for Product Catalog. Give it a name, URL, and set up a site collection administrator and press OK.
2– Once you’ve created the product catalog, you’ll see when you open it the first time there’s some helpful links right on the homepage that describe the steps you’ll need to follow. The next step is going to be to create some site columns. You can really add whatever you feel like makes sense. The next step is going to be to create a content type but just keep in mind out of the box there’s already one for Products that includes the following fields: Group Number, Item Category (managed metadata), Item Number, and Language Tag. Additionally, there’s also a content type called Product with Image with includes an additional field where you can add images. In my case I chose to add some of my own fields. The important note here is that you need to make sure that you are using a managed metadata field which can be used for navigation. If you don’t have this, you won’t be able to connect your catalog. Also, when creating the term store make sure you create something that can be used a root node below the Product Heirarchy. For some reason that level can’t be selected as a root node. Here’s a look at what my term set looks like:
3– With your site columns created, the next step is to create a new content type. From the Site Settings page click on Site Content Types under the Web Designer Galleries section. From this page click on the Create button. On the screen that opens enter in the name for the content type, choose the parent content type to select from (Product Catalog Content Types), the parent content type (Product with image), choose what group you want to place it in, and then press OK.
4– On the next screen is where you’ll add any custom fields you created to the Content Type. Choose the link that says Add from existing site columns, choose the ones to add and press OK at the bottom.
5– Next browse to the default Products list (or another one if you want to go that route), from the ribbon at the top choose the List tab and click the List Settings button. Scroll down to the Content Types section and click the link to Add from existing content types to associate our new content type to this list. Once we’ve done that go to the All Items view and make sure any custom fields we’ve created are also showing.
6– While you are in the List Settings page, click on the link for Catalog Settings. From here you’ll want to make sure that the list is setup for Catalog Sharing, specify the field(s) to be used as the primary key, and then specify the field to be used as to determine the navigation (This is the one that needs to be the managed metadata field). Then press OK.
7– This is the easy part. All you’ve got to do now is fill the list with content. But there’s a couple gotchas here that are important to point out. The first is that we’ve created new site columns so if we want the new site columns to get added to the search schema and index the items have to be filled out and the new fields have to have data in them. The second thing to remember is that once you’ve added all of your content to the list, remember that the list has approval turned on. So you’ll need to make sure all of your items are published or you’ve disabled content approval or search won’t pick up the items (this one in particular initially tripped me up).
8– There’s one other tricky little step that we need to ensure we do. That is to give permission to the site collection which will be consuming our product list so that it can access the term set. To do this go to Site Settings and from under the Site Administration section click on Term store management. At the left click to select the term store associated with your site collection and the general tab will be displayed at the right. You should see a field labled Site Collection Access. In this field type the URL of the site collection where you’ll be consuming the product catalog — if you haven’t created this, you should do that now and use the Publishing Portal template. Then type the URL into here and press Save.
9– The next step is to kick off a crawl to make sure everything we’ve done so far gets added into the index. To do that go to Central Admin and click on Manage Service Applications from under Application Management. Click on the Search Service Application link to bring up the search administration page. At the left click on the Content Sources link under the Crawling section. Hover over the name of your content source called Local SharePoint sites, click the drop down, and choose Start Full Crawl. Now is about the time you should go get a tasty beverage or something. When you get back you can click the link that says Refresh to check on the status of things, but it’ll probably take anywhere from 3-10 mins depending on how robust your server is. When the status says Idle you’ll know you are ready to move on to the next step.
10– Now’s the time you’ll want to go to that Publishing Portal that’s going to be used consuming the catalog. From Site Settings click on Manage catalog connections under the Site Administration section. Click on the link that says Connect to a catalog. The next page that opens should show the URL to your catalog. Click on the Connect link at the right. The Catalog Source Settings page will open. There’s a lot of great options here, but for this post we’ll just go with all of the defaults. But we will need to select a Root term of heirarchy from under the Navigation Heirarchy section. This is what I was referring to in step 2. If you compare the image below to the one from step 2 it should help to clear things up. This was another area that originally was a little tricky when I was trying to choose the root node at the wrong level. Once complete press OK.
11– When the page reloads you should notice that the navigation at the top of the page is being driven by the metadata. Also, if you go into the Pages library of the site you’ll notice two pages have been created — these are those page templates I was referring to earlier. If you try clicking on a link from the navigation take a look at the URLs — you’ll notice they are dramatically different from the URLs we’ve been used to in SharePoint in the past. This is something that will definitely be the subject of future posts but the the basics are that when you setup the catalog connection there was a section with options that described the Catalog Item URL Behavior and the default is to make all URLs relative to the site. Despite the fact the content lives in another site collection, it doesn’t appear that way.
This post was intended to be a guide to getting started with the first step in working with the new WCM features in SharePoint Server 2013. As I’ve mentioned throughout this post, there are a number of areas that will be important to explore in more detail at a later time. If anyone has any requests I’d love to hear them — can’t promise that it’d be something I’ve looked into yet but will definitely do my best!