Jaap Vossers' SharePoint Blog

Just another WordPress.com site

Archive for April 2009

Reusable Content & HTML Snippets

with 3 comments

So your client wants to be able to insert more than just formatted text and images in his Publishing HTML field control? So he wants to insert those fancy looking boxes that your graphics designer made? Ah, but they are variable height and require several background images so we are talking about inserting a bit of “complex” html. How can we provide a user friendly interface with as little customisation as possible? I personally like the out-of-the-box Reusable Content functionality provided by MOSS 2007. I will demonstrate how it can be used to solve our problem.

Let’s take the following box for example:


Because of the vertical scaling requirements, the box needs to be split into three logical sections: header, content, footer. The html for the box shown is as follows:

<div class="box">
    <div class="box-header">This is the header</div>
    <div class="box-content">Lorem ipsum ...</div>
    <div class="box-footer">&nbsp;</div>

The styling of the box, including the background images is done via CSS. The header and footer are fixed height, whereas the content area is variable height and has a background image that repeats in the vertical direction.

Back to SharePoint – when you create a site collection using the Publishing Site Site Definition, you should have a list called Reusable Content in your root web. You can navigate to it using Site Content and Structure. We will create an item in this list that will be a “template” for our box.

Insert a new item into the Reusable Content list. Ensure you have Automatic Update turned OFF. Use the Edit HTML Source on the html editor to paste in the following html:

<div class="box">
    <div class="box-header">[HEADER] </div>
    <div class="box-content">[CONTENT]<div>
    <div class="box-footer">&nbsp;</div>

The rest of the fields are for you to fill in. Save the item and then approve it (the Reusable Content list has content approval turned on by default).

Now that we have our box html template in place, let’s go to our page that needs to have an instance of the box appear on it. Go to edit mode and locate your Publishing Html Field Control. Click the toolbar button Open a new window to Insert Reusable Content.


Select the item that we created earlier and press OK. If everything went well, an instance of the box with text placeholders has been inserted into your Publishing HTML Field control.


All there is left to do is to place the cursor in the text placeholders and replace it with the actual content.


On a final note, be aware of the risk involved when content editors play around with div elements. I have seen situations where content editors got “creative” and partially deleted boxes, leaving orphaned div opening tags and turning the layout of your page into scrambled eggs.

Written by jvossers

April 19, 2009 at 11:10 pm

TunnelPoint review

with 4 comments

Last Wednesday during the UK SharePint event in London, Daniel McPherson from Zevenseas mentioned their new TunnelPoint service (Beta). I was kind of curious what the fuss was all about so I decided to spend a little time playing with it. I am quite excited and I must say that I love the concept. Let me try and explain how it works.

TunnelPoint is a hosted service provided by Zevenseas. It connects external services (for example SOAP web services) to SharePoint List data in your SharePoint Site. TunnelPoint uses the built-in SharePoint SOAP web services exposed by your SharePoint environment to read and write list data. Really, all you need to do is log in to TunnelPoint using your TunnelPoint account and use the web interface provided to configure which external services should map to which lists in your SharePoint site. Once you have completed your configuration, TunnelPoint will periodically consume the service and update field values in your list. The whole idea being that you do not touch your server and you do not write a single line of code.


Currently, TunnelPoint offers several services to connect with, one of which is a Currency Conversion service. I decided I would try that one out. My goal was to have a list of currency conversions in my hosted WSS site, and have TunnelPoint periodically perform the conversion for me based on the latest exchange rates.

I performed the following steps to achieve my goal:

  1. Registered with TunnelPoint.com to get a Beta user account
  2. Setup a SharePoint site within my hosted WSS environment.
  3. Created a user and added it to the owners group of my newly created site
  4. Logged in TunnelPoint.com and registered my SharePoint site by supplying its url and account credentials to be used by TunnelPoint to access the web services of my SharePoint site.
  5. Using the TunnelPoint web interface, I added the Currency Conversion service and configured it to point to the site I registered earlier and configured it to create the list for me.
  6. Manually added list items to the newly created list in my SharePoint site. These list items can be seen as tasks to be processed by TunnelPoint.
  7. Wait for TunnelPoint to operate on my list

This is what my list looked like before TunnelPoint started doing its work:


Now, after a few minutes, TunnelPoint started to wake up and decide it should update my To Amount fields by applying the currency conversion (using the external service) for each list item.

After TunnelPoint did its job, my list looked like this:


It all works like a charm and the fact that I got this to work on my hosted WSS environment where I have limited access to (I can’t even deploy a Feature to it) opens so many doors for so many people.

In my example I only connect to the Currency Conversion service, but Zevenseas offers several other services like, SMS, stock quote, short url and web site preview + more services to be added later.

On a final note, to make TunnelPoint even more powerful I would like to suggest to Zevenseas to provide a generic service, where you can configure a SOAP web service url and define mappings between list fields and web service parameters. That way the pool of services to connect to instantly grows from several, to… a lot more!

Thumbs up Zevenseas!

Written by jvossers

April 10, 2009 at 7:51 pm

Twitter meets Jaap

leave a comment »

I did try out Twitter some time ago but I did not catch the Twitter bug. I suppose it’s not really motivating to tweet anything if you only have one follower (quicker to just give him a ring instead).

I have decided to give it another go, so please don’t hesitate to follow me on Twitter.

Written by jvossers

April 10, 2009 at 11:43 am

Posted in Twitter

Live demo online for SharePoint InstantListFilter

with 5 comments

Not so long ago I posted something on my blog about a tool I released on CodePlex, called SharePoint InstantListFilter.

I have just put a live demo online so you can try it out before installing it.

Go check it out!

Written by jvossers

April 4, 2009 at 1:40 pm

cmd.exe Command History with F7

with one comment

Go and open a cmd.exe window, run a few commands and press F7…

Wow! Nice surprise, I never realised that existed. Very useful when you need to re-run some (stsadm) commands. Apparently it works in PowerShell as well.


Thank you Dan Lewis.

Written by jvossers

April 2, 2009 at 2:06 pm