www.dianthavanmarion.nl

Branding SharePoint

By Diantha van Marion

February 2nd, 2010

Video’s of the SharePoint Connections 2010 available at http://channel9.msdn.com

Some examples of interesting video’s:



Or read more about:

January 28th, 2009

Ok, now you know how to make snippets from HTML and CSS. Next thing is making the HTML. And CSS. But before you can start with that you have to know what kind of page layouts are needed. I think it is nice to have some body else think with you on this  thing. When you know what page layouts are to be made, you can think of what the ideal HTML and CSS is, to make it like that. It has to be logical, valid and compatible with MOSS, because these page layouts are to be used for making MOSS sites, or custom portals of  SharePoint.

So a couple of the layouts will be like with a header, a one, two, three or four columns
container and a footer. But of course the footer could also be underneath one or more
of the columns, instead of at the bottom of it all. Another point is the width of
the columns. Is it fixed? Or is  it liquid? And what are the names of the containers?
Do they have class names or ID names? So, there are a lot of things to be  considered.

It is really hard to give a snippet a logical name. It is just a few words, that will
need to tell how this HTML will render a page layout. You need a guide for it. In
that guide there will be all the varieties of page layouts and there name with it.
This way, you can store as many snippets as you like, cause users can look up the
name of the snippets they would like to use.

First of all make some sketches and feel free to work out the first one in HTML. As
I was doing it, I saw that I proberbly could make some HTML that will fit on multiple
sketches, and as the stylesheet is different, the page will get an other layout. Here
is what it looks like:

<div
id=”Sketch_A”>

    <div id=”topcontainer”>header</div>

    <div id=”centercontainer”>

        <div class=”left column”>left</div>

        <div class=”secondleft column”>second
left</div>

        <div class=”secondright column”>second
right</div>

        <div class=”right column”>right</div>

        <div class=”clearboth”></div>

    </div>

    <div id=”bottomcontainer”>footer</div>

</div>
The div#sketch_A determines what CSS belongs to this layout. Of course the .columns will float, in this case to the left. I could give them a classname=”left” and give it a float:left in the stylesheet. But if I do so, it will not be possible to float that one different in an other layout. So it’s better to give the whole container an ID and style the elements that are in that particular ID. So, now let’s try styling the second sketch, using the same HTML (except for the #sketch_A, that one will become #Sketch_B.)

January 26th, 2009

IntelliSense Code Snippets are reusable, task-oriented blocks of code. They provide a way for you to insert ready-made snippets of code into your projects.

It’s really easy to create a snippet in SharePoint Designer. Just select the HTML
you would like to create a snippet from and press the right button, select create
code snippet. Here’s a video on how to do it. It is really easy to create reusable
HTML, but as I was thinking, it is only the HTML. When you use the snippets to create
a certain layout, you also will need the CSS that makes the layout look like it should.
So teh next step is to create some HTML which you will make a snippet from. Then,
create some styling, which will work with the HTML and see if that can also become
a snippet. If this works, a layout can be chosen by selecting the snippet of the HTML
and the snippet of the CSS. Let’s find out..

So I created some HTML and made it a snippet. And I created some CSS to go with the
HTML and also made it a snippet. Works the same. Ok, now I’ve got a new HTML file,
and want to add the first snippet I just created. How do you do that? Mm..

Then I suddenly remembered. Pres ctrl and enter, and then there comes a popup with
all the snippets available. Including the ones I just made. Now I could add my snippets
HTML and CSS. Works just fine. But, of course I would like the CSS to be pasted in
a extern file, the stylesheet. So I created a stylesheet and saved it as .CSS file.

Actually, I opened an exiting stylesheet and try to add the snippet in there. Works!
Great. So what I can do now is create some snippets with HTML and create some snippets
with CSS and give them almost similar names, so that you can easily find the snippets
that belong to each other.

I was hoping that it was possible to make a new folder for the snippets I am about
to make, but that seems not possible. So I have to think about what keywords I will
use for the snippets. They have to be recognizable for their function and they have
to fit to another snippet, cause a HTML snippets has a matching CSS snippets.

Okay, so much for that. Let’s focus on making the HTML and CSS now.

More info on snippets:
Visual Studio 2005 Code Snippets
Visual Studio 2005 includes code snippets covering tasks ranging. A set of Visual
Basic and Visual C# Code Snippets are included in the Visual Studio 2005 box.

Creating and Using IntelliSense Code Snippets IntelliSense Code Snippets provide a
way for you to insert ready-made snippets of code into your projects. This section
contains topics describing how to create, use and manage IntelliSense Code Snippets.

Code Snippets in Microsoft Office SharePoint Designer 2007

In this video you will learn how to create code snippets and use some basic functions
of the code view inside SharePoint Designer

May 5th, 2008

Some time ago I supported a fronteer. He was new to SharePoint and I explained him how to set up a masterpage from a default masterpage and how to make a pagelayout out of you HTML markup. I realized that I explained the way I should do it. But what is the best practice here? How do other SharePoint fronteers do this? What works, what doesn’t? I’m really curious for your respond! So please do!

1. –From
graphical design to HTML—


2. –Start
implementing the masterpage–


4. –Implement a pagelayout–

5. –Fixing the style issues–

6. –Considering multiple approaches, what works, what doesn’t?

This blogpost is about implementing pagelayouts.

Ok, now your masterpage looks fine, it’s time to take a look at your pagelayouts.
First, find out which default pagelayout has the most in common with the pagelayout
you want to create. Copy-paste and rename it. Here’s your starting point.

I advise to take the same approach as you did on the masterpage. So you would copy
the HTML markup in the pagelayout and drag all the controls and other content to the
right place.

After that, the default markup that was in there at the beginning can be deteled.
It’s time to finetune. Make sure your pagelayout has got the right controls, webpartzones
and so on. Use some display and edit controles to define what controles are to be
(only) on the frondend and what is to be (only) on the backend, the edit mode. Make
sure some developer sets all the right controles in there for you, so you don’t have
to strugle with contenttypes that has to be made.

After you are done, check in the pagelayout and create some pages with this pagelayout,
fill them with webparts and dummy content and after that: finetune, finetune, finetune..

I would advise to give the overall div an id-name that fit’s the name of the pagelayout,
for example “HomePage_with_no_leftmenu”. This way you can easely find the right pagelayout
later on, when your portal is filled and you are fixing some late issues. Here’s
a site
that defines it very clear. Read all about:

  • Where do the default content placeholders get their content?
  • Locate a content placeholder
  • The default content placeholders on Default.master in a Windows SharePoint Services
    3.0 site
  • Modify the content in a content placeholder

Next is the issue fixing story. Read all about it next time!

April 21st, 2008

Once there was a customer who wanted to place any image on top of the content, underneath the header. But only on the homepage.  And the breadcrumb must be visible underneath the image. And if there wasn’t any image defined, a default image should be showed.
So, what I needed was a webpartzone inside the masterpage, so that there could be
a image webpart above the breadcrumb.  To do this, you mast place a contentplaceholder
inside the masterpage. In the pagelayout then, you can define that inside that contentplaceholder
must come a webpartzone. Like this:
masterpage:


<asp:ContentPlaceHolder ID=”leftBottomMenuPlaceHolder” runat=”server”>
</asp:ContentPlaceHolder>

pagelayout:
<asp:Content runat=”server” ContentPlaceHolderID=”leftBottomMenuPlaceHolder”>  
         
    <WebPartPages:WebPartZone

        runat=”server”

        AllowPersonalization=”false”

        Width=”100%”

        FrameType=”TitleBarOnly”

        title=”leftBottomMenuPlaceHolder”

        id=”leftBottomMenuPlaceHolder”

        orientation=”Vertical”

        QuickAdd-GroupNames=”Search”

            QuickAdd-ShowListsAndLibraries=”false”>
        <ZoneTemplate>
           </ZoneTemplate>
    </WebPartPages:WebPartZone>    
</asp:Content>

I also placed a div around the contentplaceholder inside the masterpage, so that I
could say by css:
Set the background-image and make the height 20px, the height of the default image.
If the image added by the customer has a bigger height, it will scale and the default
background-image won’t be visible.

Customer happy, I happy.
 

April 18th, 2008

Some time ago I did a post
about using background-images in your site design
. I advised to add an extra div,
which started after the body tag and before the aspnetform, and would end after the
closing tag of the aspnetform.

This, however will cause another issue, that is small
frames in the edit mode
. I did a post on that one to.

So to come back on how to go, and what’s the best approach, I’d say it’s better to
just add an id-name to the body tag. This way, any RTF-editor will render any styling
attached to the body tag, but it won’t render any properties of the body tag with
that particular id-name.

Tadaa!

Thx Kwok!

April 10th, 2008

Here are som interesting url’s about the masterpage and pagelayouts.

Url about how to customize masterpages in windows sharepoints services:
http://msdn2.microsoft.com/en-us/library/ms476046.aspx

Url about how to modify the default.master:
http://office.microsoft.com/en-us/sharepointdesigner/HA101009061033.aspx

Url about how to change the current master page:
http://office.microsoft.com/en-us/sharepointdesigner/HA101671651033.aspx

Url about how to modify the default SharePoint content placeholders:
http://office.microsoft.com/en-us/sharepointdesigner/HA101651201033.aspx

February 26th, 2008

Last week I supported a fronteer. He was new to SharePoint and I explained him how
to set up a masterpage from a default masterpage and how to make a pagelayout out
of you HTML markup. I realized that I explained the way I should do it. But what is
the best practice here? How do other SharePoint fronteers do this? What works, what
doesn’t?

So there are some interesting blog postings to come and I’m really curious for your
respond! So please do!

1. –From graphical design to HTML–
2. –Start implementing the masterpage–

3. –Implement a pagelayout–

4. –Fixing the style issues–

5. –Considering multiple approaches, what works, what doesn’t?

 

–From graphical design to HTML–

Start with the Graphical design. First make sure you really understand the meanings
of the graphical design made by the designer. What happens when you scale your browser,
to wide tables are used in the content and what happens if you mouse over, click or
already visited a link? And what happens to the top navigation when too much items
are added?

When this is clear, send the PSD you’ve got from the designer to the printer. On this
piece of paper ( I know, it’s so old-fashioned ) we draw some squares to define what
is to be the masterpage and what is to be in the pagelayout. How do you know this?
Well the masterpage consists of elements (could be anything) that come back onto every
page. Well, maybe not every page, in some section you might want a slightly different
masterpage. For example on the homepage, where you don’t want a specific menu. Or
in a news article page, where you don’t want that fancy image in the header. So the
masterpage contains the elements coming back on every page, like: The logo, portal
name, login-link, search engine, top navigation, header image, quick launch menu,
footer, etc.

Masterpages cannot contain a webpartzone. But how to go if you want your client to
be able to add a header image? In the masterpage, you can define a Placeholder control.
Place it wherever you would place your header image.

In the pagelayouts, set a control with the same id-name and place your webpartzone
inside. You have to do this for every pagelayout that needs a header image in the
masterpage. For each page though, there has to be added a image webpart, or whatever
webpart you like. So be aware of this, if you use a webpartzone in your masterpage.

If your client wants a header image on 90% of the pages, this is not the way the
way to implement it!
I used it for a client who has a default image in the header
and wanted to place some other images on some of the pages. So when there’s no webpart
in the webpartzone, the default image is showed on the background of the webpartzone.
Set by the CSS-style.

How do we know what’s in the pagelayout? Well, the pagelayout has a lot of placeholders,
webpartzones and controls. Normally there’s no content in it, just some controls that
dynamically render content, such as the page title, date, breadcrumb and so on. The
pagelayouts defines the layout, the zones wherein the page content will be showed.
If you have a right zone in your graphical design with some functionality, you can
consider placing one webpartzone there. The user can easily add some webparts there
and fill them. But what if one of these webparts in the graphical design has a different
layout, like another background color? Every webpart had a unique ID, but you cannot
know what webpart is placed in which webpartzone. So for that, add another webpartzone
with an ID-name, so you can define any webpart that is placed inside that particular
webpartzone. Think about what element of a page are variable, and can be placed somewhere
else, and what element aren’t, link the title of a news article. This way you can
divide your pagelayouts.
 

After that you can start translating the graphical design into HTML and CSS. Start
with the positioning of the layout. Build up your HTML-page width div’s (instead of
those ugly tables) and position them by setting there property’s in the CSS-file.
May considering to use an other CSS-file for the pagelayouts (and masterpage) and
another for the markup of the content. Use logical div class names and ID names and
make sure an ID name is unique (otherwise, make it a class name). Cut your images
out of the .PSD and place them in the image folder (which you can access by a relative
url from your CSS : ../images/ ). Reserve some space for elements like a menu.

This is a dynamic and default SharePoint element (ASPmenu), so it’s properly reused
(which means another dirty table). Well if not, write down a short menu with list-items.
Make sure there are links in it of every used navigation level. Then turn to your
developers and show them this is the way you want the menu to be rendered. Don’t forget
to add a class name for the selected state of the selected (active) menu item. Or
even more, if you want the parent of the selected menu item to look different. This
is something we can’t do by CSS.

So you have your graphical design, you know how many masterpages must be made and
what to put in it. You know all about the pagelayouts, and you have your HTML-files
and CSS as a starting point. I think you’re ready to start implementing. Let’s start
at the beginning, the masterpage.

Read all about implementing the masterpage next blog post!