Archive

Posts Tagged ‘Branding’

Merry Christmas and a Happy New Year

December 22, 2012 Leave a comment

Merry Christmas

-

and a

-

Happy New Year

-

JulKulor
________________________________________________________________________________________________________________

With wishes for a great SharePoint year to come!

Regards

Twitter | Technet Profile | LinkedIn

BLKSTHL gets a well-deserved facelift

December 5, 2012 Leave a comment

Hi all

BLKSTHL_180

I felt that it was time to give the blog a facelift, the built-in theme was nice but it had drawbacks such as the width that for some reason are to narrow on all of the offered out of box themes. This design is somewhat SharePoint 2013 inspired and is easier to read and has more horizontal space…finally. No more cropped code segments…
My hope is that you will find it better in every way. If the theme is anything you like, feel free to ask for it and you shall recieve the CSS file.

And yes, just to remind myself what I had Before, this is what it looked like:

OldDesign


_________________________________________________________

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

SPB usage guide – 2 Configuration and Modification

April 4, 2012 44 comments

SPB usage guide – 2 Configuration and Modification

This is the guide on how to install and use the SharePoint Branding Project.
Download: Visual Studio gallery

The guide is devided into three parts:

1 Download and Installation

2 Configuration and Modification

3 Deployment and verification (soon to be released)

In part 1 of this guide, we left off at the new project dialog:

In the categories, select C#, SharePoint, 2010 and SharePoint 2010 Branding Project.
Name the project(This name will also be the name of the SharePoint Feature), select its file location and Click OK.

Clicking on OK will create a new project for you in Visual Studio, the project will be a complete branding solution ready to deploy or package and install to a SharePoint 2010 farm or even an Office 365/SharePoint online tenant.

The first thing that you will see is the SharePointBrandingProject in the solution explorer:

The solution will by default have a number of components and functionalities.

Custom SPB Masterpages for:
Team sites MyBranding.master, equivalent to the general V4.master.
Meeting Workspaces MyBrandingMWS.master, equivalent to the general MWSDefaultV4.master.
Team sites MyBrandingMinimal.master, equivalent to the minimal.master.

Custom SPB StyleSheets:
MyStyles.css, Contains styles for basic look and feel for most sites and is used in all masterpages.
MyStylesMinimal.css, This is an additional stylesheet loaded and used when the MyBrandingMinimal.master is loaded.

Custom logo:
logo.png
Custom Favicon:

favicon.ico

Custom Eventreciever:
ChildSiteInit, This handles the web provisioned event to apply branding on new subsites.

Custom Feature:
Main, This feature applies the branding to the rootsite and all subsites.

In order to deploy this solution directly from Visual Studio to your test site, enter the url of you site collection in the project properties:

Now you are ready to deploy the solution to SharePoint with the default branding. The default branding is good looking and all that, but perhaps you want to make a few changes first? I would however recommend that you try the deployment so that you can verify that everything really works and that you have the permissions needed and so on. After successful trial deploy and complete awe for the good looking SHarePoint you made for yourself, it is time to start changing the branding.

First thing you will want to do, is replace the logo and favicon(if you did not know this, the favicon is the small tiny image that is located to very left in the address field in your Internet Explorer browser(I guess FF and others too). The favicon is loacated in Solution Explorer in the Images folder under the Style Library/My Branding/Images/
You can replace this file with a new favicon using the same name, but it must have the same properties: 32×32, a 24bit bmp .ico file. There are applications that are made just for the purpose of creating icons available. Or there is a plugin to PhotoShop available if you have access to PhotoShop (ICO (Windows icon) plugin). You can also edit the icon right here in Visual Studio but that is probably not for the thorrow artists…

Same story with the logo, it does not have the same rigorous restrictions on the size and type, but it should be close to what is the default size, use a too big or small image and you will have to make adjustments to the master/Stylesheets to compensate.
The logo can be edited in Visual Studio but that is not something that you do, use a proper image editing application, or simply adjust you current company/Organization/Customer logo to fit. I will now show you how you replace the default logo file with your own custom logo:

The current logo, logo.png – 120×120.
Delete the default logo by right clicking on the imagefile in the solution explorer and Click Delete:

Click OK in the confirmation dialog:

Now the logo file is deleted and we have to replace it with our new custom logo file. For simplicity, use a PNG file if you have one (if you don’t, use another file but then you will HAVE to edit the feature that adds the logo to the site).
To add the image, Right Click on the Images flder in solution explorer, then select Existing Item and Add:

Browse to your logo file in the explorer window, it can be located locally, or on a fileshare somewhere. Select the file and Click Add:

Now the imagefile is added, in my case I have found a wonderful logo from back in the days, when SharePoint 2001 was the talk of the town. SharePoint Portal Server 2001 had a pretty mean logo, this is what I’ll be using in my demo. See this guide part 3 for a presentation of that logo in action.

For the branding project to recognize the image as the logo, it will have to be renamed to logo.png (unless you used another fileformat or if you want to edit the feature to fit anyway).
Right Click on the Image in the Solution explorer window and select Rename.

Beautiful! The solution is again ready to be deployed:

Before we deploy the solution, I want to just quickly show you the basics of how you edit the real source of the branding solution, the master pages and the stylesheets. What you do is that you in Solution explorer, Double Click on the master or stylesheet you want to edit or look at. Try that and you will see something like this for the master:

And this if you Double Click on a StyleSheet(css)…
Did you know that CSS actually stands for Cascading Style Sheets, Cascading comes from the order in which they are applied, the classes in the last css to be applied overruns the previous even if they contain the same classes.

Now we are ready to deploy. So, how do we do that? From Visual Studio, you simply do it in a few Clicks, or really, its just two Clicks away.
Right Click on the Project in Solution explorer, Click Deploy.

Verify that the deployment went ok:

In my case, it did! Happy happy! Over to the browser and verify the new look and feel, go to the site, if allready there, refresh the page.

This is what my site looks like with that beautiful replaced retro logo, don’t you just love it?

In the next section of this guide, I will show you what the branding does and what you will see in the browser ‘onsite’.
The next part is called:

3 Configuration and Modification (soon to be released)

See also the previous part:

1 Download and Installation

Stay tuned!

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

 

SPB usage guide – 1 Download and Installation

April 4, 2012 10 comments

SPB usage guide – 1 Download and Installation

This is the guide on how to install and use the SharePoint Branding Project.
Download: Visual Studio gallery

The guide is devided into three parts:

1 Download and Installation

2 Configuration and Modification

3 Deployment and verification (soon to be released)

Hi friends.

Allow me to welcome you on a journey to the wonderful world of SharePoint Branding. I created this SharePoint Branding Project thinking that the overhead and the learning curve to just get started with branding, was way too high. The amount of blogs to read and discard until you could actually build you very first, very basic custom branding solution, it was rediculous! Now pretty recently, the guides on Technet have been improved and most of them actually work, but it is still a long way to go if you want to start from scratch with little or no knowledge about how you go about creating such a project in Visual Studio.
With the SharePoint Branding Project, you can brand your company, organization or customer SharePoint in about 10 minutes, and you will have full control doing so. Follow this guide and you will cruise all the way to the finnish line.
To use this template, you need a SharePoint 2010 and Visual Studio on the same machine. If you can follow instructions, then you can achieve this.
Now, lets get started and have some fun, this IS fun after all!

There are two ways to download the extension file from the Visual Studio Gallery, the first is to simply go to the Visual Studio gallery, Click SPB.
Then on the large purple button, Click Download.

In the annoying but useful IE download bar, Click Open.

Click ‘Install’ to install the extension into Visual Studio.

When the extension is installed you will get a ‘Complete’ notice. Click Close in the dialog.

You are now done downloading and Installing the actual extension and you can now move on to the interesting stuff,  to create a SharePoint Branding Project in Visual Studio.
But before we go into how, we will show you another way to install the extension. From Visual Studio Extension Manager. The extension manager will show the installed extension regarless of the way you installed it, here you will also be notified of updates that have been released of the same extension.
Follow these steps from Visual Studio:

Start the Extension Manager from Visual Studio, Tools menu, Click Extension Manager

Click Online Gallery and search for SPB or browse the ‘Templates’ category and ‘SharePoint’ and you will find the SPB extension.
Click Download and the file will download and initiate the installation. Click Install in the next dialog:

When the extesion have been installed, you can’t wait to get going with the branding right. Ok, we will start that part, regardless of the way you choose to perform the download and installation, and the installation (Which is very quick) has completed, in Visual Studio, select File, New and Click Project:

In the Installed Templates section, select Visual C#, SharePoint, 2010 and SharePoint 2010 Branding Project.
Name the project (This name will also be the name of the SharePoint Feature once deployed to SharePoint), select the projects file location and Click OK.

Now you are done with the installation and can move on to the next step in this guide:

2 Configuration and Modification

or jump directly to the last step, not recommended:

3 Deployment and verification(soon to be released)

Stay tuned!

Enjoy!

Regards

Twitter | Technet Profile | LinkedIn

 

A guide to Branding and SharePoint Foundation part 2

March 27, 2012 5 comments

A guide to Branding and SharePoint Foundation
Part 2

Part 1 | Part 2 |

This is the part two of the series trying to cover the tweaks needed to get a starter branding going on a SharePoint Foundation installation.

In part 1 I tried to explain why the most common method of using the $PUrl to get the relative path does not work and also how to customize the masterpage in order to insert a custom favicon without the use of $SPUrl. Now I will cover how to add a custom CSS to your master without the use of $SPUrl.

The most common method on a SharePoint server is to add this line:

<SharePoint:CssRegistration name=”<% $SPUrl:~sitecollection/Style Library/My Branding/MyStyles.css %>”After=”corev4.css” runat=”server” />

After the default CSS loader:

<SharePoint:CssLink runat=”server” Version=”4″/>

But since the use of $SPUrl is unavailable to us, we need to find something else. If we use a hardcoded path it will work as long as the master is deployed only in the site collection root, but if we want to use the same master in all subsites(spwebs) as well, then we need a way to get the relative path from the sitecollection root. In my SharePoint Branding Project Foundation adaptation I solved it like this:

<asp:literal runat=”server” Text=”&lt;link href='”/>
<SharePoint:ProjectProperty Property=”SiteUrl” runat=”server” />
<asp:literal runat=”server” Text=”/Style Library/My Branding/MyStyles.css’ rel=’stylesheet’ type=’text/css’/&gt;”/>

What the code does is that it builds a new href link that point to the custom css deployed to the site collection style library, same as the <SharePoint:CssRegistration would, it renders a link and loads the css. If we want the custom css to be applied after the default, then we also need to add these lines before the default css line.
The trick to this is the use of the webcontrol SharePoint:ProjectProperty that is available for use in Foundation as well as Server. This will give you the URL to the Site Collection root, for example:

http://www.mycompany.com/sites/finance

Putting two literal contols before and after the webcontrol to fill in the text needed for a complete link tag is all that is needed.

This solution works very well for me, I hope that you will also find some help in my suggestion.

See also part 1, on how to add a custom favicon to your Foundation master

Stay tuned!

Regards

 

A guide to Branding and SharePoint Foundation part 1

March 18, 2012 6 comments

A guide to Branding and SharePoint Foundation
Part 1

Part 1 | Part 2 |

SharePoint branding is something that most everyone wants to do, the default design is pretty good and stylish but it get dull and it does not fit in with any organizations brand book or design policy. A lot of posts have been written on the subject of SharePoint branding, many books have been published and most of what can be covered has been covered. What I found though during my work with the SharePoint Branding Project, is that there is a lack of information about branding and Foundation. Lots of organizations run Foundation, the reasons for doing so are many but the facts remains, SharePoint Foundation 2010 has a very large installed base. So, can’t we just buy the book on SharePoint branding and implement it in our Foundation farm? The answer to that question is most of the time no, or rather, not very likely. SharePoint Server has one vital component that Foundation lacks, it has a publishing infrastructure feature. In most cases the publishing components are used for some vital parts of a branding package, the most common one that you will see in almost every post is the

<% $SPUrl:~sitecollection/pathtosomething/%>

The SPUrl token is very handy when storing files in a centralized location in SharePoint, like for example the ‘sites/mycompany/style library/’. Lets use the FavIcon as an example in the first part.

<link rel=’shortcut icon’ href='<% $SPUrl:~sitecollection/Style Library/My Branding/Images/favicon.ico %>’/>

This tag would in Server farm pick the FavIcon image out from the site collection root. In Foundation you would see an error similar to this:

‘The expression prefix ‘SPUrl’ was not recognized. Please correct the prefix or register the prefix in the <expressionBuilders> section of configuration.’

Accessing CSS or Image files in the Style Library is easy using the $SPUrl expression builder to get the relative Site Collection Root URL(/sites/mycompany) or even the current Web Root URL. In Foundation the SPUrl token can’t be used so we need something else. One solution is pretty easy, just enter the relative path:

<link rel=’shortcut icon’ href=’sites/mycompany/style library/my branding/Images/favicon.ico’/>

For the Site Collection Root the path would resolve to:

http://webapplication/sites/mycompany/Style Library/My Branding/Images/favicon.ico

Perfectly allright, the favicon would be loaded. This is a great solution, with one huge flaw. If you have the branding implemented in all of your subsites then the path will be correct only in the root. Since the path is relative, it would in an example subsite look like this in the master:

<link rel=’shortcut icon’ href=’sites/MyCompany/Style Library/My Branding/Images/favicon.ico %>’/>

For my SubDivision subsite the path would resolve to:

http://webapplication/sites/mycompany/subdivision/Style Library/My Branding/Images/favicon.ico

Not ok! The load would fail since the favicon.ico is not located there. So, the permanent relative is only good for a site collection root with no subsites. You could obviously add the file to every subsite so that the path would work, but that is not really an option in most cases. So, how do we do it then…? In my own SharePoint branding project I use this workaround to replace the <link rel=’shortcut icon’ token:

<asp:literal runat=”server” Text=”&lt;link rel=’shortcut icon’ href='”/>
<SharePoint:ProjectProperty Property=”SiteUrl” runat=”server” />
<asp:literal runat=”server” Text=”/style library/my branding/images/favicon.ico’/&gt;”/>

It is a workaround, but it works. This will in reality build a relative path to the Site Collection Root even in the subsites and it will build up the <link> token by using 2 literal asp controls and the SharePoint:ProjectProperty control that is available in Foundation. The result in runtime will be the same as for a URL built on the $SPUrl expression builder.

<link rel=’shortcut icon’ href=’sites/mycompany/style library/my branding/Images/favicon.ico’/>

Add this to your Masterpage and you will have a functional FavIcon that uses a relative path.

Stay tuned!

Best regards

Follow

Get every new post delivered to your Inbox.

Join 204 other followers