SP2013: Looking into Design Manager (or is it package?)

Well it’s time for some new stuff..

I was looking into the possibility to just migrate some looks and master page from SharePoint 2010 to SharePoint 2013.

Well what I’ve found was a whole new world Smile 

First of all

  • Fields: in SP2010 you had the option not to add the “{ and }” and it would still work, well now you’ll get an error, so MS has gone more strict

SharePoint requires a Field ID to be a hyphen-separated GUID, enclosed in braces.

But first things first, what is a Design Package?

Well if you activate the “SharePoint Server Publishing Infrastructure” (in Site Collection Features) than you can see some new nodes in the “Look and Feel” section on the Site Settings page.


1. Welcome to the Design Manager

When you click the first one “Design Manager” , than a page comes up that has a few steps that you can follow.


The link for the Design manager overview will bring you here .

The core sentence of this overview is : “Design manager is the central hub and interface where you manage all aspects of a custom design”.

2. Manage Device Channels

The second step gives you the option to manage or create new Device Channels, what these you can read on a blog post of Waldek .

Bottom line is that SharePoint 2013 now can be viewed by different browsers in a different way. If you going to a page via your home PC browser you’ll see the full page, but looking at that same page via tablet or mobile it will give you a slightly different version. Main benefit is that it will use less bandwidth , for example images will be smaller on a tablet than on a full blown browser.

In the print screen below you can see that I’ve added a Windows Phone entry.


3. Design files

In the next step you will be explained to map a network drive to your master page gallery. This will make it easy to edit/upload or delete files directly from that gallery.


4. Edit master pages

well this one I found very cool..


The link “Convert an HTML file to a SP master page” I found very intriguing.

When clicking on it, you get a pop –up where you can select an Asset.


So ok, I click “add” new item and upload a just created html file.. something so basic Smile (it was all I still knew from HTML code Winking smile )

        <title>testing the html</title>
        testing it now


so when we open this html file in the browser we get something very basic (as expected)


Ok I admit, it’s ugly but still, it’s only a test, so I upload this file to the masterpage gallery and as you can see a couple of print screens back , TestHtml is listed. Ok so far so good but how on earth is SharePoint going to display this ugly simple html file? Behold…


Well this is very very nice Smile, and if we check in the master page gallery, sure enough there are now TestHtml files

  • My recently uploaded html file
  • a TestHtml.master file

I’m adding the date as well in the print screen so you can see that I’m not cheating here


When we are looking into the TestHtml.html file when we download this file again you are going to be surprised…

Question: What are you expecting?

  • the simple code that I’ve showed in the code snippet above
  • some generated code from SharePoint with a whole lot of overhead
  • or an empty file

Let me know in some comments what Smile 

        <div id='s4-workspace'>
            <div id='s4-bodyContainer'>
testing it now

                <div data-name='ContentPlaceHolderMain'>
                    <!--CS: Start PlaceHolderMain Snippet-->
                    <!--SPM:<%@Register Tagprefix='SharePoint' Namespace='Microsoft.SharePoint.WebControls' Assembly='Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'%>-->
                    <!--MS:<SharePoint:AjaxDelta ID='DeltaPlaceHolderMain' IsMainContent='true' runat='server'>-->
                        <!--MS:<asp:ContentPlaceHolder ID='PlaceHolderMain' runat='server'>-->
                            <div class='DefaultContentBlock' style='border:medium black solid; background:yellow; color:black; margin:20px; padding:10px;'>
            This div, which you should delete, represents the content area that your Page Layouts and pages will fill. Design your Master Page around this content placeholder.
                    <!--CE: End PlaceHolderMain Snippet-->

This is cool right.. SharePoint actually looks at the html file and generates completely understandable code around it Smile 

Now when I looked at the TestHtml.master file I’ve found something cool, apparently the .html file and the .master file are linked.

<%– SPG:

This HTML file has been associated with a SharePoint Master Page (.master file) carrying the same name.  While the files remain associated, you will not be allowed to edit the .master file, and any rename, move, or deletion operations will be reciprocated.

To build the master page directly from this HTML file, simply edit the page as you normally would.  Use the Snippet Generator at http://sp2013rtm:2020/_layouts/15/ComponentHome.aspx?Url=http%3A%2F%2Fsp2013rtm%3A2020%2F%5Fcatalogs%2Fmasterpage%2FTestHtml%2Emaster to create and customize useful SharePoint entities, then copy and paste them as HTML snippets into your HTML code.   All updates to this file will automatically sync to the associated Master Page.

<%@Master language=”C#”%>

Clear enough no?

Ok let’s go for a look at that url…


So this is what it is, a snippet gallery, above you can select in the ribbontab “Design” all the elements that you want to design and on the right hand side you can see all the properties, in the html snippet window all your properties are being generated by the generator Smile and of course a nice preview above. On the print screen below I selected “site logo” from the ribbon to show you the difference, pretty nice features no? For more info about this you can go the a good blog post I found about it.



5. Edit display templates

Now this was something else that I expected..

Search results and other search-related web parts rely on display templates to control the appearance and behavior of search results. The best way to create a new display template is to copy an existing one that’s similar to what you want and then change yours using any HTML editor.-> this is the sentence above the list view, as you can see each time you have the html file and the code file below the page.


Explanation from a Microsoft site:

Edit display templates

If you are using an on-premises installation of SharePoint Server, you can use the Content Search Web Part and other search-driven Web Parts to display the results of search queries as content on your pages. Search-driven Web Parts use display templates for two main purposes:

  • To map the managed properties that are returned in search-result items to properties that will be available for JavaScript, including whatever custom JavaScript you choose to implement.

  • To use HTML and CSS to present and style how those properties are displayed.

With master pages and page layouts, you edit an associated HTML file but not the .master file or .aspx file. Similarly, display templates are made of an HTML file and an associated .js file, where you edit only the HTML file. Each time you save that HTML file, SharePoint automatically updates the associated .js file.

When you want to create a custom display template, you should begin by copying and then modifying one of the existing display templates. This is helpful because the default display templates contain information in comments in the HTML files, and you’ll have the proper basic page structure and a framework in place for basic tasks like mapping input fields.

6. Edit Page layouts

Here we can create our own page layouts, how many web part zones there are in the page and how they are positioned on the page. Of course these things must be done via an editor but you can start to create a page layout and take it from there.


In the creation process of the page layout, all you need to do is give a name, select the masterpage and select a content type.. this can be an article page, welcome page, redirect page.. etc..


7. Publish and Apply Design

When all of the above steps are done we can start using our newly created masterpage and stuff


In the assign window for the master page I couldn’t see the newly created TestHtml and at the moment I have no idea why Smile 

I’ll look into this one of the next days as to why my masterpage isn’t visible here (it has nothing to do with the status of the masterpage in draft mode, because oslo is also in the draft status)..

I’ll certainly come back to this.


8. Design Package

And this is also nice, everything you’ve added and stuff, you can create a WSP file from this so you can import this in a Visual studio solution and continue tinkering on the design.


As you can see when you click on “create”, a export page is being called to create the package


And now you can download your .Wsp file Smile 

In part 2 I will import this file into a Visual studio solution and I’ll make it up into parts to discuss piece by piece.

Hope this helps someone..

EDIT: A question was launched in the comments below, whether or not the Masterpage is ghosted or unghosted..

In this blog post the principle is explained and a way on to check if a page or masterpage is ghosted or unghosted.

If we are going to check the 2 files via SharePoint Manager 2013 than we can see that these files are not ghosted.

image image

But the way we’ve created the files (by just uploading them) is the explanation as to why they are not ghosted, if we put them into a feature and deploy this feature, they should be ghosted.

Leave a Reply

Your email address will not be published. Required fields are marked *