Posts Tagged ‘SharePoint’

Monday, October 1st, 2007

SharePoint Branding Issues

As promised, I am writing a series of blogposts regarding issues you may encouter when developing a custom branding solution for SharePoint. Customers usually want to customize the out of the box design SharePoint is offering. It often simply does not reflect their company’s branding. SharePoint uses master pages and CSS to provide a consistent look throughout their pages. But when developing a custom design, you will notice it is not that easy to customize the things you want. So how do I tackle this?

I always create a custom master page. Why do you ask? The master pages SharePoint provides do not always provide CSS support on all it tags, and codewise the HTML is not really clean. The number one thing to remember when developing a minimal or custom master page for SharePoint is that SharePoint expects a number of PlaceHolders to be within the master page.  If there’s some content in a placeholder you don’t want to be available on the page, don’t simply remove the place holder. Move the place holder within a hidden ASP panel.
So is that it? Obviously, no. SharePoint makes extensive use of controls within its pages. You can add and remove them at your discretion. Though there are a couple one which are pretty critical to ensure SharePoint running correctly. Namely, You better declare a SPWebPartManager on your page, otherwise WebParts won’t work. Another thing is to include the form tag right after the beginning of the body tag. This to ensure pages can be posted. Some other controls you might want to include, but which aren’t necessary include wssuc:Welcome, PublishingSiteAction:SiteActionMenu and PublishingConsole:Console.

In short:

  • add a form tag (don’t forget the JS wrapper functions)
  • include all place holders
  • add a WebPartManager control

So, now you have your master page. What about the CSS? SharePoint uses the CSSLink control to add references to their CSS files, of which core.css is the most important. The default way to do CSS in SharePoint is to overwrite the SharePoint CSS in custom CSS files. Unfortunately this method can be quite cumbersome, as core.css seems to be a SS rather than a CSS. They don’t really use the cascading part of style sheets. So, you have to overwrite multiple classes before a change comes through, and sometimes it’s impossible to overwrite a style whithout changing another style too.
My preferred way to work is to remove the CSSLink control altogether and use my own stylesheets. I have two. The first one is a CoreLight.css. It encapsulates only the most necessary classes from core.css and the ones who mostly do not have to be customized. Of course, I cleaned up this style sheet. This is a file I reuse with each project and keeps getting better with each project. The other file is the CSS specifically for the current project. It’ll define the styles, colors, layouts, typography the project uses.

In short:

  • do not use CSSLink
  • create a CoreLight, which incorporates the necessary core.css classes (and others)
  • create a specific stylesheet, where you define project related resources.

Mind that this way to work may not be the most recommended with SharePoint guidelines. It just makes my work far more easier. I can redesign a whole site within one work week. It is up to you to use the method you’re more at ease with.

This was my global approach for custom SharePoint branding. Following articles will deal with some specific issues when creating a custom SharePoint branding.

Wednesday, September 26th, 2007

A fresh start

Well, this feels strangely familiar. It has been a while, since I’ve last written something. Maybe some of you have read my “notorious” adventures with C++ and OpenGL. I have not yet sorted out whether or not I should leave the old posts (as they are in Dutch), but for the moment, I’ll leave them to be read. But for those of you new here, welcome on my blog.

So, I’m starting all over again. But what is different, you may ask? First thing you may notice is that the blog sports a new design. Bye bye Blix, hello Blogari. And this time, it’s a custom made design, specifically made for this blog. It was kinda hard finding the right one, but I think this design will do just fine for now. I’m still not 100% satisfied with the color scheme, though. Then again, I never am with the designs I make, so let’s just see how this one comes along.

The blog uses the new WordPress engine. (2.3 for those keeping stats) It has a new tagging framework – including a nifty tag cloud – and an update notifcation system for its plugins. So it’s a pretty decent update, I think. I’ve looked into the possibility of using another cms for this blog. Tried some more exotic software such as Joomla and Drupal, but in the end, I just stuck with good old WordPress, as it is great in what is does, namely blogging!

Talking about CMS, it’s a nice intro for the stuff I’ll be blogging about. It’s been more than a year since I graduated at KULeuven. And I found a nice little job at Dolmen, a Belgian IT service provider. A consultancy firm, if you like. And for almost a year now, I’ve been developing SharePoint solutions for all kinds of customers. (WSS 3.0 as well as MOSS 2007) So this is what this blog will be mainly about, sharing my new adventures with SharePoint and analyzing technical issues I come accross. As you may have guessed SharePoint will not be the only subject on this blog, although most ramblings will still involve computer technology.

As a final note, to celebrate this new beginning, I am preparing a series of blogposts covering some issues when designing layouts for SharePoint. Those will be posted as soon as possible.

PS: We are in the middle of a server upgrade (talking about good timing… :p) Yesterday I updated the version on the new server. But there were some technical difficulties. So we reverted back to the old server. So if you post a comment, it’ll likely be gone tomorrow. Just bare with me.

PS 2:  You are now reading the new server