You are currently browsing the monthly archive for October 2009.

One of the great benefits of running online workshops is that it pushes me to refine my solutions.
The cornerstone of Tuesday’s visualization workshop is the HTML calculated column. So for the occasion I revisited my script and worked on several improvements. The main one is to make the filter menu work for HTML calculated columns (see screenshot).
Another enhancement I am working on is to allow the use of HTML calculated columns for grouping (see second screenshot).
The first to benefit from the improvements will of course be the workshop participants, as the filter menu will be included in the script they’ll receive. The complete version (v3) of the HTML Calculated Column with all the enhancements should be published by the end of the year.
Update [11/01/2009] Another screenshot of my work in progress: HTML calculated columns used for two level grouping.

Visualizing Information in SharePoint is the theme of my next online workshop, scheduled on November 3rd. In this entry level session, we’ll see how color coding and other effects can be applied to SharePoint lists, using only out of the box features.
If you are a regular reader of this blog, you may already be familiar with this technique, and know how easy and powerful it is. So, how about spreading the word? If you have a colleague who has been hesitant to make the plunge and try out client side scripts, this workshop is a unique opportunity to get started!
You’ll find several examples featuring this technique in my blog. Also, follow Mark Miller’s series of screencasts showcasing real life examples – starting with this one.
And if you are using SharePoint 2003, this also works in your environment!
Mark Miller has just released the EUSP workshop calendar for November and December.
I’ll be presenting 4 workshops:
Visualizing Information in SharePoint: Tuesday, November 03, 1:00 PM (ET)
jQuery Animations in SharePoint: Tuesday, November 17, 1:00 PM (ET)
SharePoint Charts and Graphs: Part 02 (Sparklines): Wednesday, December 02, 1:00 PM (ET)
SharePoint Charts and Graphs: Gantt Charts: Thursday, December 10, 1:00 PM (ET)
These are hands on trainings. Each participant receives a sandbox and the Web Parts needed for the workshop.
7000+ SharePointers have migrated to Las Vegas for this week’s SharePoint gathering, while many more – me included – are staying at home and are anxious to grab the latest news on SharePoint 2010 from the Internet.
I have set up a page to share news from the conference:
http://www.pathtosharepoint.com/Pages/SPC09.aspx
On the left side, I am displaying the channels that Mark Miller has set up, including in particular live blogging from more than a hundred (!) SharePoint professionals, divided into 7 groups, who are reporting in real time on the sessions they attend.
On the right side of the page are my findings, grabbed from my rss feeds and Internet search (I recommend Jeff Teper’s review of SharePoint 2010 features). I am trying to stay away from developer info, and focus on content accessible to end users.
If you have any interesting links to share, feel free to add them in the comments section below, and I’ll push them to my SPC09 page.
Hope you find this helpful!
Warning: the script below contains a time bomb. Be sure to read the whole article before using it.
A question from the STP forum: how can I change the layout of my Web Part zones, without SharePoint Designer or server side access? For example: on the home page (default.aspx), I only want one column. Or I want two columns with the same width (50%).
In the past, I have already answered specific cases. Today I am proposing a more generic approach.
In a SharePoint page, there is nothing special that identifies Web Part zones. When you look at the page html, zones are just regular table cells. My idea is to include in the Web Part zone a CEWP (Content Editor Web Part) that will act as a tracking device. It will identify its host zone and then apply customizations to it. btw this technique is similar to the one used for the Easy Tabs.
Here is a sample script including two examples:
<script id="RightWPzone" type="text/javascript">
/*************************************
Customize the Right Web Part zone
Christophe Humbert
Christophe@PathToSharePoint.com
*************************************/
function GetParentTable(elem)
{
while(elem !=null && elem.tagName !="TABLE") elem=elem.parentNode;
return elem;
}
var thisWPzone = GetParentTable(GetParentTable(document.getElementById("RightWPzone")).parentNode);
if (thisWPzone.id != "MSOZone") { // Remove this line if the customizations also apply in edit mode
var thisWPzone = thisWPzone.parentNode;
// Example 1: set the Web Part zone width
thisWPzone.style.width = "50%";
// Example 2: hide the Web Part zone
try {thisWPzone.previousSibling.style.display = "none";} catch(err){}
thisWPzone.style.display = "none";
} // Remove this line if the customizations also apply in edit mode
</script>
Simply add a CEWP to your Web Part zone, add the above script, and change it as needed (the main tool for these customizations is the style object).
When you reuse the script for several zones on your page, make sure that each script has its own id (the id appears twice in the script). In my sample script the id is “RightWPzone”.
A time bomb, you said?
Let’s say we decide to hide a Web Part zone, both in edit and view mode (so that nobody is tempted to drop a Web Part there):
<script id="RightWPzone" type="text/javascript">
/*************************************
Hide the Right Web Part zone
Christophe Humbert
Christophe@PathToSharePoint.com
*************************************/
function GetParentTable(elem)
{
while(elem !=null && elem.tagName !="TABLE") elem=elem.parentNode;
return elem;
}
var thisWPzone = GetParentTable(GetParentTable(document.getElementById("RightWPzone")).parentNode);
var thisWPzone = thisWPzone.parentNode;
thisWPzone.previousSibling.style.display = "none";
thisWPzone.style.display = "none";
</script>
So far so good…but what if I need to make changes? Well, I’m stuck, as I can’t access the zone content anymore, even in edit mode! Fortunately – and this is one reason why I love working with CEWPs – there’s always the option to undo the customization. You can remove the Web Part from the page, with this well known trick:
…/default.aspx?contents=1
If you append the ?contents=1 querystring to the URL, you’ll be sent to the maintenance page, where you can manage your Web Parts.
Another way to deal with this issue is to apply a “best practice”: don’t put the code directly into a CEWP, place it in a separate text file instead, and link the CEWP to it (cf. this article for more details).
18 registrations so far, so we still have a few seats left for the October 16 online workshop dedicated to SharePoint calendars. If you were planning to attend, I recommend that you register as soon as possible.
As usual, the purpose of these workshops it to offer concrete solutions to address business users’ issues. Implementing these solutions does not require server access.
In the workshop, we’ll review in particular the following topics:
- how to include color coding and icons
- various ways to resize month views (including this example)
- how to share a calendar view across multiple sites
All the participants will receive the Web Parts for these customizations, and a sandbox to try them out.
Talk to you this Friday!


SocialVibe