I’ve just created a video guide on creating a simple content type and attaching it to a document library.>
You can add custom metadata to a SharePoint list by:
- Adding columns directly onto the list
- Using Site Columns (can be reused with other lists)
- Content Types (can be reused and keeps a set of custom columns together in a content type)
If you decide to use a content type, you will also get the benefits of being able to apply a workflow to the content type (rather than to each list individually). If you are thinking of developing search, content types can be a great way to filter and search for specific types of data in a list. You can also use multiple content types in a list (each with different columns), for example an invoice and a receipt.
Content queries in page layouts can be quite useful when wanting to generate your own navigation based on page content type. There isn’t a straight forward way to adding these into your current page layouts so I thought it would be useful to share this method.
Open Design Manager from the menu.
Select “Edit Page Layouts” and create a new temporary page layout (as shown below).
Select “Conversion successful” to go to the preview page. In the top right select “Snippets” to open up the snippet code generator.
Select “Other Web Parts” drop down menu and click “Content Query”.
Configure the web part including the appearance, title and queries. Select the update button to generate the custom code.
Copy the custom code generated, this code needs to be pasted into the HTML version of the temporary page layout via SharePoint Designer 2013. Once this code has been copied into the page layout HTML, in this case testttt.html, save the file.
SharePoint will then automatically convert this code to aspx in the file testttt.aspx. Open this file to grab the content query code which can be used in any page layout.
Of course you can use the design manager to create your actual page layout (rather than just using it to convert code) but many people find this restrictive and already have good page layouts ready to deploy.
If you require any help or training, check out my consultancy company Cloud Design Box which provides this and other services for SharePoint on-premises and Office 365.
Each content type in a document library can be assigned an individual document templates. In the document library below, two different content types have been added, each with a different template.
To edit the word templates, open the site in SharePoint designer 2013.
Open the document library.
In the content types section, open the content type (in this case it is called Policy).
In the ribbon select “Edit Document Template”.
This will allow you to create a dotx document which will be the template for this particular content type in this library. Once the template has been saved, it will be available as the main template for the content type.
When users create a document using the Policy content type from the new menu, it will prompt them to enter a name for the new document.
Please note that currently, the new templates will only open in Office Web Apps (online) if using Internet Explorer. Other browsers will prompt to open in the client application.