Skip to content

blksthl

Mostly what I know and share about…

Tag: image

Revised A guide to quick SharePoint 2013 branding – part 2 – with Javascript


LabCenter-stamp-v3

NO DEVELOPMENT IN VISUAL STUDIO OR SHAREPOINT DESIGNER REQUIRED

This is revision 2 of the A guide to quick SharePoint 2013 branding – part 2 – with Javascript. A few of the javasnippets turned out to stop working if MDS, Minimal Download Strategy was in affect which made the branding miss the target. The lines of javacode in this revised post has been corrected and will now work just as well with MDS.
I have to send a BIG thank you to Anurag Yagnik for getting me on the right track and for verifying the functionality. THANKS!

Hi dear SharePointies and SharePoints.

Welcome to the revised part 2, the revised version has some changes and rather updating the original post, I’ll keep some history and get a new post out with slightly different content.
I assume that you have seen and followed part 1, A guide to quick SharePoint 2013 branding so I will not cover every step needed, some you will have to get from part 1.
This is for all of you SharePoint technicians and enthusiasts out there who are not developers or don’t really have time or feel like learning the new ‘Design Manager’. All of the steps here can be done using only a Windows client and appropriate permissions.

This guide has been verified in SharePoint Online. If you have done the steps in Onpremise server and/or Foundation, please drop me a comment and I will add that here and also give you credit for it.

In part 1, we added a custom masterpage, a css/stylesheet file, a favicon and a logo image. We configured SharePoint to use the custom masterpage and in that we referenced the custom css, the favicon and the logo. All good.
Now, we want to get rid of the annoying default blue ‘banner’ with the Office 365 logo(SPO), the SharePoint text (Onprem/Foundation).
Without using Visual Studio…or SharePoint Designer…

Before1x

In this short guide, I will use a site located in SharePoint Online (2013/Preview, link at the end), but the steps are exactly the same in an onprem environment.

For the permanent production branding, I have to recommend using Visual Studio to create a wsp package, as long as you add the same files as I do here it will work the same. That way you will have an installable package that can be reinstalled and used in test and dev environment. You can also make sure the package works Before moving it into production.

We will in part 2, make this (pretty good):

Before1

Look like this (even better):

After

In my opinion, a whole lot better!
Now let’s get on with branding our site:

Use the sitecollection you used before, or simply any site collection will do. Work with the rootsite as usual.

Before1

To do what I am going to do, we need two new and one modified file:

truesec.js – New (Contains all the actual JavaScript code)
TrueSec_transparent_white.png – New (New logo, White on transparent for a nice effect)
truesec.master – Old (only modified to load the JavaScript file)

I will start by creating a simple JavaScript file, use a local folder to store your files in, we will later upload them to SharePoint.

NewFiles1

NewFiles2

Yes, you want to change the extension.
I added this JavaScript lines to my truesec.js file, see inline comments to see what it does

_spBodyOnLoadFunctionNames.push(“myinit”);

function myinit()
{
// This function makes sure that the script is executed after the page has completed loading

ExecuteOrDelayUntilScriptLoaded(function () {
if (typeof asyncDeltaManager != “undefined”)
asyncDeltaManager.add_endRequest(ConfigureBrandingsuite);
else ConfigureBrandingsuite();
}, “sp.js”);
}

function ConfigureBrandingsuite()
{
 // Thanks to Anurag Yagnik for the enhanced script
 var v_icon, v_iconbox;
 var v_suiteBarLeftm, v_ribbonbox;
 var v_link;
 // Replace the default logo with my own shiny white with transparant background, oh-yeah!
 var v_newImageSrc=”../_catalogs/masterpage/truesec/TrueSec_transparent_white.png”;
 
 // get link reference so that we can point to our website, replace with your own
 v_link = document.getElementById(“suiteBrandingLink”);
 v_link.href=”https://blog.blksthl.com“;
 
 // get icon reference so that we can change properties
 v_icon = document.getElementById(“suiteBrandingIcon”);
 v_iconbox = document.getElementById(“suiteBrandingIconBox”);
 v_suiteBarLeft = document.getElementById(“suiteBarLeft”);
 v_ribbonbox = document.getElementById(“s4-ribbonrow”);
 
 // customize icon, icon box, background color and title
 // Setting the background of the entire suitebarleft to jet-black for maximum effect
 v_suiteBarLeft .style.background = “#000000”;
 // v_ribbonbox.style.display=”none”;
 // Setting the width to a little more than default, else the image may be cropped
 v_iconbox.style.width=”200px”;
 v_icon.src = v_newImageSrc;
 v_icon.style.width=”150px”;
 v_icon.style.left=”0″;
 v_icon.style.top=”0″;
 v_icon.alt=”Go to My Portal”;
 v_icon.title=”Go to My Portal”;
  
 // site specific – hide logo since we already have on on top left now
 //document.getElementById(“ctl00_onetidHeadbnnr2″).style.display=”none”;
 
 return false;
}

Make sure that your quotes and double quotes are correct, copying from a webpage often result in misformatted quotes. Avoid this by reviewing the code thoroughly in notepad. The ‘wrong’ kind usually leans to one or the other direction, whilst the ‘correct’ kind are straight. Example:quotesx

NewFiles3

Ok, thats one out of three files, moving on to the masterpage.
This you may allready have stored locally, but if you don’t, download a copy from SharePoint. I’ll use my custom truesec.master from part 1.

In your SharePoint site collection root, select Site Settings, then ‘Web Designer Galleries/Master pages’

Settings1x

Settings11x

Settings4x

In the master page gallery, navigate to your custom folder, mine is named ‘TrueSec’ obviously…

Masterpage7x
Open the custom branding folder and in it, locate you master page.
Select the file in the checkbox and click on ‘Download a Copy’.

EditMaster1x

EditMaster2

Save the file to your local folder.

EditMaster31x

Now, we will add a simple line to the masterpage, right click on the masterpage and select edit in notepad.

EditMaster41x

Locate the following SharePoint:Scriptlinks:

EditMaster42

After the line:
<SharePoint:ScriptLink language=”javascript” name=”suitelinks.js” OnDemand=”true” runat=”server” Localizable=”false” />

Add:
<SharePoint:ScriptLink ID=”ScriptLink1″ runat=”server” Defer=”False” Name=”~siteCollection/_catalogs/masterpage/TrueSec/truesec.js”></SharePoint:ScriptLink>

Make sure that your quotes and double quotes are correct, copying from a webpage often result in misformatted quotes.
Avoid this by reviewing the code thoroughly in notepad. The ‘wrong’ kind usually leans to one or the other direction, whilst the ‘correct’ kind are straight.
Example:
quotesx

With the code added, that part of the masterpage will now look like this:

<SharePoint:ScriptLink language=”javascript” name=”sharing.js” OnDemand=”true” runat=”server” Localizable=”false” />
<SharePoint:ScriptLink language=”javascript” name=”suitelinks.js” OnDemand=”true” runat=”server” Localizable=”false” />

<SharePoint:ScriptLink ID=”ScriptLink1″ runat=”server” Defer=”False” Name=”~siteCollection/_catalogs/masterpage/TrueSec/truesec.js”></SharePoint:ScriptLink>

<SharePoint:CustomJSUrl runat=”server” /> <SharePoint:SoapDiscoveryLink runat=”server” />

or:

EditMaster43x

Save the file and leave it for now. We will upload all the files later.

So, two out of three done.
Time for the simplest one, the image. I wanted to add something a bit different than the logo I have already added, so I went with a logo in white on black instead of black on white. The image file is White on transparent and then the java script sets the background to jet-black which makes it all perfect. You use the images you want and for your customer/company/organization and make the decisions based on the colors you have there, I bet it will be beautiful!

3files

Ok, if you started out like I did with the ‘light branding’ already in Place, then you are pretty much done, all we need to do is upload the files and reload the page to see the result. Go to your site, open ‘Site settings’, ‘Master page’, browse to your folder, in my case its ‘/TrueSec’. Once here, select the ‘Files’ tab and ‘Upload Document’.

Addfilesx

Now, if you already had the custom master selected in the site, it will load automatically with the JavaScript and all. Load the site in a browser to see the result:

After

If any of the branding does not show up, one good T-shooting step is to go to the MasterPage gallery again and the ‘truesec’ folder. In here, click on the dropdown for each file and make sure they are all published, if you get the option to ‘Publish a major version’ do it. That helps a lot of times when anything is wrong.
If anything is so wrong so that you can’t access any of the sites, use this link: [URL to your team site]/_layouts/15/ChangeSiteMasterPage.aspx, it will allow you to switch back to the ‘Seattle master’ and get access to the libraries and settings again. Make Changes, fix the problem, upload the new file and switch back to your custom master again to test. 

Where to go from here?
In addition to the objects I have modified using java, there are several you can figure out how to configure for yourselves. If you want to find the objects, you can use F12 – Developer Toolbar that is built into IE.
Or, use any of these that are part of the 2013 default objects:
suiteBarLeft
suiteBarRight
suiteBrandingBox

DeltaSuiteLinks
suiteBarRight
RibbonContainer-TabRowRight

All og these have different properties to be configured, google, test, play around and find out what can be done.

References:

SharePoint 2013 Execute Javascript function after MDS load
http://blog.symprogress.com/2013/09/sharepoint-2013-execute-javascript-function-after-mds-load/

SharePoint 2013 Top links – Name, ID and How to Hide them (Excellent post on the objects and a start, how to hide them completely)
http://www.tuyrcorp.com/sharepoint-2013-top-links-name-id-and-how-to-hide-them/

A great place to learn html and css
http://www.w3schools.com/

Great overall branding blogger
http://blog.drisgill.com/

Map a network drive to the SharePoint 2013 Master Page Gallery
http://msdn.microsoft.com/en-us/library/jj733519.aspx

How to: Convert an HTML file into a master page in SharePoint Server 2013
http://msdn.microsoft.com/en-us/library/jj822370.aspx

Starter Master Pages for SharePoint 2013 (more advanced branding)
http://startermasterpages.codeplex.com/

Office 365 Preview
http://www.microsoft.com/office/preview/en/office-365-enterprise


___________________________________________________________________________________________________

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

Advertisement
Thomas Balkeståhl Branding, Foundation, JavaScript, Jquery, js, Office 365, Scripting, SharePoint 2013, SharePoint Online 44 Comments September 5, 2013September 5, 2013 7 Minutes

A guide to quick SharePoint 2013 branding – part 2 – with Javascript


A new revised version of this post is available, please go to:
‘
Revised A guide to quick SharePoint 2013 branding – part 2 – with Javascript

‘
LabCenter-stamp-v3

NO DEVELOPMENT IN VISUAL STUDIO OR SHAREPOINT DESIGNER REQUIRED

Hi dear SharePointies and SharePoints.

Welcome to part 2, I assume that you have seen and followed part 1, A guide to quick SharePoint 2013 branding so I will not cover every step needed, some you will have to get from part 1.
This is for all of you SharePoint technicians and enthusiasts out there who are not developers or don’t really have time or feel like learning the new ‘Design Manager’. All of the steps here can be done using only a Windows client and appropriate permissions.

This guide has been verified in SharePoint Online. If you have done the steps in Onpremise server and/or Foundation, please drop me a comment and I will add that here and also give you credit for it.

In part 1, we added a custom masterpage, a css/stylesheet file, a favicon and a logo image. We configured SharePoint to use the custom masterpage and in that we referenced the custom css, the favicon and the logo. All good.
Now, we want to get rid of the annoying default blue ‘banner’ with the Office 365 logo(SPO), the SharePoint text (Onprem/Foundation).
Without using Visual Studio…or SharePoint Designer…

Before1x

In this short guide, I will use a site located in SharePoint Online (2013/Preview, link at the end), but the steps are exactly the same in an onprem environment.

For the permanent production branding, I have to recommend using Visual Studio to create a wsp package, as long as you add the same files as I do here it will work the same. That way you will have an installable package that can be reinstalled and used in test and dev environment. You can also make sure the package works Before moving it into production.

We will in part 2, make this (pretty good):

Before1

Look like this (even better):

After

In my opinion, a whole lot better!
Now let’s get on with branding our site:

Use the sitecollection you used before, or simply any site collection will do. Work with the rootsite as usual.

Before1

To do what I am going to do, we need two new and one modified file:

truesec.js – New (Contains all the actual JavaScript code)
TrueSec_transparent_white.png – New (New logo, White on transparent for a nice effect)
truesec.master – Old (only modified to load the JavaScript file)

I will start by creating a simple JavaScript file, use a local folder to store your files in, we will later upload them to SharePoint.

NewFiles1

NewFiles2

Yes, you want to change the extension.
I added this JavaScript lines to my truesec.js file, see inline comments to see what it does

_spBodyOnLoadFunctionNames.push(“ConfigureBrandingsuite”);

function ConfigureBrandingsuite()
{
<!– Replace the default logo with my own shiny white with transparant background, oh-yeah! –>
document.getElementById(‘suiteBrandingIcon’).src = “/_catalogs/masterpage/truesec/TrueSec_transparent_white.png”;

<!– Setting the width to a little more than default, else the image may be cropped –>
document.getElementById(‘suiteBrandingIcon’).style.width=”155px”;

<!– Set the background of the entire suitebarleft to jet-black for maximum effect! –>
document.getElementById(‘suiteBarLeft’).style.background = ‘#000000’;
}

Make sure that your quotes and double quotes are correct, copying from a webpage often result in misformatted quotes. Avoid this by reviewing the code thoroughly in notepad. The ‘wrong’ kind usually leans to one or the other direction, whilst the ‘correct’ kind are straight. Example:quotesx

NewFiles3

Ok, thats one out of three files, moving on to the masterpage.
This you may allready have stored locally, but if you don’t, download a copy from SharePoint. I’ll use my custom truesec.master from part 1.

In your SharePoint site collection root, select Site Settings, then ‘Web Designer Galleries/Master pages’

Settings1x

Settings11x

Settings4x

In the master page gallery, navigate to your custom folder, mine is named ‘TrueSec’ obviously…

Masterpage7x
Open the custom branding folder and in it, locate you master page.
Select the file in the checkbox and click on ‘Download a Copy’.

EditMaster1x

EditMaster2

Save the file to your local folder.

EditMaster31x

Now, we will add a simple line to the masterpage, right click on the masterpage and select edit in notepad.

EditMaster41x

Locate the following SharePoint:Scriptlinks:

EditMaster42

After the line:
<SharePoint:ScriptLink language=”javascript” name=”suitelinks.js” OnDemand=”true” runat=”server” Localizable=”false” />

Add:
<SharePoint:ScriptLink ID=”ScriptLink1″ runat=”server” Defer=”False” Name=”~siteCollection/_catalogs/masterpage/TrueSec/truesec.js”></SharePoint:ScriptLink>

Make sure that your quotes and double quotes are correct, copying from a webpage often result in misformatted quotes.
Avoid this by reviewing the code thoroughly in notepad. The ‘wrong’ kind usually leans to one or the other direction, whilst the ‘correct’ kind are straight.
Example:
quotesx

With the code added, that part of the masterpage will now look like this:

<SharePoint:ScriptLink language=”javascript” name=”sharing.js” OnDemand=”true” runat=”server” Localizable=”false” />
<SharePoint:ScriptLink language=”javascript” name=”suitelinks.js” OnDemand=”true” runat=”server” Localizable=”false” />

<SharePoint:ScriptLink ID=”ScriptLink1″ runat=”server” Defer=”False” Name=”~siteCollection/_catalogs/masterpage/TrueSec/truesec.js”></SharePoint:ScriptLink>

<SharePoint:CustomJSUrl runat=”server” /> <SharePoint:SoapDiscoveryLink runat=”server” />

or:

EditMaster43x

Save the file and leave it for now. We will upload all the files later.

So, two out of three done.
Time for the simplest one, the image. I wanted to add something a bit different than the logo I have already added, so I went with a logo in white on black instead of black on white. The image file is White on transparent and then the java script sets the background to jet-black which makes it all perfect. You use the images you want and for your customer/company/organization and make the decisions based on the colors you have there, I bet it will be beautiful!

3files

Ok, if you started out like I did with the ‘light branding’ already in Place, then you are pretty much done, all we need to do is upload the files and reload the page to see the result. Go to your site, open ‘Site settings’, ‘Master page’, browse to your folder, in my case its ‘/TrueSec’. Once here, select the ‘Files’ tab and ‘Upload Document’.

Addfilesx

Now, if you already had the custom master selected in the site, it will load automatically with the JavaScript and all. Load the site in a browser to see the result:

After

Where to go from here?
In addition to the objects I have modified using java, there are several you can figure out how to configure for yourselves. If you want to find the objects, you can use F12 – Developer Toolbar that is built into IE.
Or, use any of these that are part of the 2013 default objects:
suiteBarLeft
suiteBarRight
suiteBrandingBox

DeltaSuiteLinks
suiteBarRight
RibbonContainer-TabRowRight

All og these have different properties to be configured, google, test, play around and find out what can be done.

References:

SharePoint 2013 Top links – Name, ID and How to Hide them (Excellent post on the objects and a start, how to hide them completely)
http://www.tuyrcorp.com/sharepoint-2013-top-links-name-id-and-how-to-hide-them/

A great place to learn html and css
http://www.w3schools.com/

Great overall branding blogger
http://blog.drisgill.com/

Map a network drive to the SharePoint 2013 Master Page Gallery
http://msdn.microsoft.com/en-us/library/jj733519.aspx

How to: Convert an HTML file into a master page in SharePoint Server 2013
http://msdn.microsoft.com/en-us/library/jj822370.aspx

Starter Master Pages for SharePoint 2013 (more advanced branding)
http://startermasterpages.codeplex.com/

Office 365 Preview
http://www.microsoft.com/office/preview/en/office-365-enterprise


___________________________________________________________________________________________________

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

Thomas Balkeståhl Branding, Foundation, JavaScript, Jquery, js, Office 365, Scripting, SharePoint 2013, SharePoint Online 17 Comments March 20, 2013September 5, 2013 5 Minutes

A guide to quick SharePoint 2013 branding


LabCenter-stamp-v2

NO DEVELOPMENT IN VISUAL STUDIO OR SHAREPOINT DESIGNER REQUIRED

Hi dear SharePointies and SharePoints.

This will be a Quick way to get a familiar touch applied to your teamsites (and other sites as well)
(See also part two: A guide to quick SharePoint 2013 branding – part 2 – with Javascript)

This guide has been verified in SharePoint Foundation 2013 as well as Server and Online, BIG thanks to Chuck Snyder and others for verifying functionality in SharePoint Foundation 2013.

Some of you may already have tried some of the branding features built into SharePoint 2013 and SharePoint Online (2013), Microsoft have added some functionality that makes it easier for some and harder for some. I had branding in 2010 pretty much figured out and now to me it seems like they have given the box a good shake, everything is almost in the same place as before…but not quite…
I have noticed that most of the branding info that is out, most blogs and presentations have been about branding a publishing site, meaning an external website or intranet portal or similar, sites meant to be branded and customized. In this guide I will fokus on the teamsite, probably the most used site of them all…

I will show you step by step how to access some of the basics in branding your sites, no development yet…the tools needed for this exercise, is notepad.exe…that’s it…

In this short guide, I will use a site located in SharePoint Online (2013/Preview, link at the end), but the steps are exactly the same in an onprem environment.

For the permanent production branding, I have to recommend using Visual Studio to create a wsp package, as long as you add the same files as I do here it will work the same. That way you will have an installable package that can be reinstalled and used in test and dev environment. You can also make sure the package works Before moving it into production.

We will make this:

Start4

Look like this:

after_v2

Now let’s get on with it:

Create a new site collection and work with the rootsite.

Start4

Having a brand-new unbranded, untouched team site, I will start by getting the files to start working with, we need a new MasterPage (.master) and a new StyleSheet (.css).
In the top right corner, click on the little cogwheel/gearwheel.

Settings1x

Then click on ‘Site settings’ in the dropdown.

Settings11x

Site Settings offers a lot of choices, we are only going to be using a few.

Settings2

The branding features of SharePoint are mainly located in the ‘Web Designer Galleries’ and the ‘Look and Feel’ sections of site settings.

Settings3

Settings4x

In Web Designer Galleries section, click on Master pages

Masterpage1

In here we will store the files we need, to make it a bit more structured, we will create a dedicated folder for our efforts only, I’ll call mine TrueSec.
In the ribbon section, click on the tab called FILES, then ‘New Folder’.

Masterpage2x

Type in the name and hit ‘Save’

Masterpage6x

The folders and files are in alphabetical order, so in my case using truesec, I have to go to the next page. Use the arrow at the bottom.

Masterpage21x

Masterpage7x

Ok, now we have a place to put our files, next, we download a copy of the default masterpage beeing used in a SharePoint 2013 team site, ‘Seattle.master’

Masterpage71x

Use the dropdown menu on the file

Seattlex

In the IE download bar, select the dropdown arrow and select ‘Save as’.

Seattle2x

Save the file in a suitable location, I put mine in a folder on the desktop. Leave the filename as is.

Seattle3x

Select ‘Open folder’

Seattle4x

Seattle5x

Next, we make a copy of the seattle.master and rename it to what we want. I’m going with truesec.master

Seattle6x

Seattle7x

Ok, now we have a local copy of the default masterpage called truesec.master. It is at this point still identical to the default and we’ll leave it that way for now.
Now, we get a copy of the default stylesheet used in the seattle.master, called core15.css.
Go back to the browser with your site and masterpage gallery, click on the SharePoint logo.

Masterpage1homex

Now, we are back in the root team site and its homepage, from here it is a simple task to download the stylesheet, since it is not located in the masterpage gallery, I’ll use a different method to get it.
In your Internet Explorer browser, click on F12, this will bring up the F12-Developer toolbar, a great built in tool.

StyleSheet2x

Click on the tab named ‘CSS’

StyleSheet3x

Make sure that the path is selected, that points to the core15.css file

StyleSheet8x

Then on the little ‘Save’ button

StyleSheet31x

This method may result in a slightly ‘off’ css file (missing navigation in one occation), the reason is that the developer dashbord will save a rendered css file instead of the actual file.
In order to avoid any risk for that, type in the full path to the actual corev15.css file, then save it to disk.

Place the file in the same folder locally on your computer as the seattle.master/truesec.master.

StyleSheet5x

Same as before, make a copy and then rename it to truesec.css

A slightly more difficult but better way, is to create a new blank text file and rename it to ‘truesec.css’, then, add to this file only the ID’s and Classes that you want to style.
Adding only the classes/ID’s you want to edit the styles for, will save bandwidth and improve performance as well as keep the css file manageble.
Example, say that you want to style the Page Title with a new font-size and color, add only this to the empty text file:
.ms-core-pageTitle
{
font-size:30pt;
color:rgb(255, 127, 39); /* blksthl orange */
}

(read the core15.css to get an idea of how it is built)

StyleSheet6x

StyleSheet7x

Ok, now we have both the files needed to make the changes to the branding, but we do need two more things to make the branding a bit more interesting. Logos, I’ll show you how to replace the default logo (the big one) and the favicon (the smaller ones), the little thing in the address bar that is actually used for a few things and will affect the braded feel of the site pretty much.

logo1x

I’m adding the files to my local folder to make it simple and keep it all in one place.

If you don’t already have a favicon for your organization, you can use any one of the free image to favicon sites available to create one from a image. I have used several and for example this works: http://favicon.htmlkit.com/favicon/.
This tool will also let you select the formats you want.

Logos1x

I have in my example a favicon file of dimension 32×32 with a color depth of 32. 16×16 works just as well.

Logos2

The original ‘SharePoint‘ logo is 180×64 and as long as you stay close to that, the design will be ok.

Logos3

Now, we will edit the files and add the simple magic lines….

First, we want to load out custom StyleSheet, it’s not custom yet, but loading it will allow you to make modifications to it later. So, open up the copy of the master file, in my case the file named truesec.master
(Notice the filepaths, all pointing to the masterpage gallery catalog and our truesec folder)

Attention! If you copy and paste from the code below, you may have to replace the quotes and double-quotes with your own, do a replace in notepad. I have tried to replace them in the code samples but be aware.
The quotes if copied here is for some reason of a different format and will cause the code to fail if used as-is. Usually you will see that you get a left and right version of the quotes, they do not work. See example:
quotesx
(This may differ depending on what text editor you are using)

Locate the line:
(Use Notepad find and search for ‘corev15’)
<SharePoint:CssRegistration Name=”Themable/corev15.css” runat=”server”/>

custommaster1x

Add directly below it as one line:
<SharePoint:CssRegistration name=”/_catalogs/masterpage/truesec/truesec.css” After=”corev15.css” runat=”server”/>

That will make:

custommaster2x

Next we add our custom favicon, locate the line:
(Use Notepad find and search for ‘favicon’)
<SharePoint:SPShortcutIcon runat=”server” IconUrl=”/_layouts/15/images/favicon.ico?rev=23″ />

Change it to:
<SharePoint:SPShortcutIcon runat=”server” IconUrl=”/_catalogs/masterpage/truesec/favicon.ico” />

custommaster5x

Next and last, we add the actual logo, locate the line below:
(Use Notepad find and search for ‘LogoImage’)

<SharePoint:SiteLogoImage CssClass=”ms-siteicon-img” name=”onetidHeadbnnr0″ id=”onetidHeadbnnr2″ LogoImageUrl=”/_layouts/15/images/siteIcon.png?rev=23″ runat=”server”/>

Edit or replace it to look like this:

<SharePoint:SiteLogoImage CssClass=”ms-siteicon-img” name=”onetidHeadbnnr0″ id=”onetidHeadbnnr2″ LogoImageUrl=”/_catalogs/masterpage/truesec/trueseclogo.png” runat=”server”/>
( Update: Added missing endtag /> )

custommaster4x

There, the files are edited and if we upload and use these, we will have the logo and the favicon used in our site. We will at this point not touch the css.

Warning! Make sure that you do not make any mistakes editing the masterpage, if you accidentally remove something you could end up with a site that is inaccessible, if you do, SharePoint designer can be used to correct the masterpage again

(If you don’t plan to edit the css in the future, you can either skip loading it or at least clear the file of content, making it empty and quick to load.)

Upload the files in your local folder from the masterpage gallery, cogwheel, ‘Site settings’, ‘Master pages’. Browse to your folder, my ‘truesec’ folder.

Addfilesx

In the upload dialog, browse to your files, add a comment if you like but make sure that the destination folder points to your folder (relative path).

Addfiles1x

In the second dialog, make sure that you for the masterpage, select ASP.NET Master Page, like in the picture below, for the other files including the css, select Content type ‘Design file’

Addfiles61x

Ok, files uploaded, all ready to use…almost.
I have found that the master needs to be published as a major version before being accessible from the gui. Click on the dropdown arrow, then ‘Publish a Major Version’.

Apparently, if the publishing site feature hasn’t been activated, the ‘Publish as a Major Version’ is missing, the workaround then is to check the file out, then check it back in and select major version.

Addfiles7x

Now, we need to change the masterpage that is used…this is actually a part of the publishing features, but if you don’t have the site collection publishing feature and the site publishing feature activated, try using this direct link instead:

[URL to your team site]/_layouts/15/ChangeSiteMasterPage.aspx

The ‘Site Setting – Site Master Page Setting’ dialog seems to only be available if the site Collection feature, ‘SharePoint Server Publishing Feature’, has once been enabled. Try it, I enabled it, accessed the page, then disabled it again and I could still access it. (I don’t Think that is by design.)
Sometimes there is an error when clicking ok but the masterpage was still updated…this in onprem as well as online.

For me it looks like:

path

Now, we change the masterpage used from this:

ChangeMaster1x

To this:

ChangeMaster2x

Click on OK in the bottom right corner.

ChangeMaster3x

Done, TADA!

Tadax

(The green background comes from Windows 8s adaptive coloring based on the background image, my background Changes on a Schedule so IE will look different all the time)
If you also pin the Internet Explorer tab to the taskbar, you will also have it look like this:

Tada1x

Nice huh?
Try to make some light changes to the css file as well, start out small. Use F12 Developer Toolbar and the arrow function to point to an object and find out what styles are applied and from what id/class they are coming.
It’s easy:

editcssx

Press F12, then use the arrow

editcss1x

Click on an object, like the site title

editcss2x

In the styles list you will now be able to find what gives the title its color and size:

.ms-core-pageTitle, .ms-corepageTitle a
and
.ms-core-pageTitle

Locate them in the local css, upload it and overwrite the old, reload the page, VOILA!

PageTitle

To continue, follow the next part of this SharePoint 2013 branding guide:
A guide to quick SharePoint 2013 branding – part 2 – with Javascript

This will allow you to use java to set the color and image of the top ‘chrome’. Even the Little buttons and toggles to the right. You will own them all.

Afterx

References:

A great place to learn html and css
http://www.w3schools.com/

Great overall branding blogger
http://blog.drisgill.com/

Map a network drive to the SharePoint 2013 Master Page Gallery
http://msdn.microsoft.com/en-us/library/jj733519.aspx

How to: Convert an HTML file into a master page in SharePoint Server 2013
http://msdn.microsoft.com/en-us/library/jj822370.aspx

Starter Master Pages for SharePoint 2013 (more advanced branding)
http://startermasterpages.codeplex.com/

Office 365 Preview
http://www.microsoft.com/office/preview/en/office-365-enterprise


___________________________________________________________________________________________________

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

Thomas Balkeståhl Branding, Foundation, Office 365, SharePoint 2013, SharePoint Online 114 Comments February 26, 2013March 20, 2014 9 Minutes

Recent Posts

  • The complete list of groupIds for private endpoint & privatelink service connection

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 308 other subscribers
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • blksthl
    • Join 115 other followers
    • Already have a WordPress.com account? Log in now.
    • blksthl
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...