Archive for the ‘SharePoint Designer’ Category

Data View WebPart – Format Any value-of select to wrap text

March 25, 2013

Latest “bang my head on the desk” moment was to wrap text in a data view web part. The XLST was modified to show conditional formatting and had columns I wanted, however modifying the width of the webpart, scrollbars appeared. Which is not what I nor the customer wanted.

To avoid this to show line of business data and/or any content from sharepoint, edit the XLST and change the span style for the particular value-of select column, e.g from:

<xsl:value-of select=”/dsQueryResponse/NewDataSet/Row/@title” />


<span style=”width:32px; overflow:auto; white-space:normal”>
<xsl:value-of select=”/dsQueryResponse/NewDataSet/Row/@title” />


Hyperlink/Picture Column does not display image

October 24, 2011

I came across a very interesting issue. I had a simple custom SharePoint List library. One of the columns was a “headshot” formatted as a Picture to allow users to paste in a URL of their pictures.

In a SharePoint list view, the picture came out wonderfully. However, I wanted to be a little creative in SharePoint Designer.

So I created my data view and dragged my columns onto the page.


The Headshot value turned out to be something like this on the page. “http://intranet-porta/headshots/uzma1.jpg,&#8221;

When formatting the “@Headshot” value as a picture link was broken. All images in the list turned out to have an extra “,” at the end of the URL.

The work around is to create a XSL attribute, in my example, I created:


<xsl:attribute name=”src”>

<xsl:value-of select=”substring-before(@Headshot,’,’)” />



And it works like magic!

SharePoint Designer 2010

October 19, 2011

I will highly recommend Penny Coventry’s SharePoint Deisgner 2010 step by step book. I have had a particular interest in workflows over the last few months and have made a great solution for a new employee workflow! Fantastic book and update to the SharePoint world!!
Fairly good price on Amazon:

Show All Subsites on a Webpage (without using table of contents web part!)

July 8, 2010

It’s been a while, I know. I’ve been lost under the radar when it comes to SharePoint but I am back!

I’ve had a large collection of subsites and no matter how much I tweaked the master.xml file that controls the number of sites you can have on a drop down menu, my table of contents web part simply would not display all subsites. Annoying.

However, a stroke of luck brought me to Michael Wilcox’s blog and here’s how you display a subsite on a webpage using SPDesigner 2007:

You can use SharePoint Designer to show a list of sub sites in a MOSS site.

An example of a sub site is a document workspace. An overview of all available sub sites provides an easy way for users to navigate to these workspaces.

1) Open your site in SharePoint Designer

2) Open the Data Source Library task pane

3) Connect to the XML Web Service that provides information about the sub sites.

 4) Add the information to your home page

You can drag and drop the newly created data source to your home page. A list of sub sites will be shown.

5) Change the way the information is shown.

By default a plain list of the sub sites will be shown. You can change this list, and for instance make the URL’s clickable. As you hover over the title field, right click and select:

  • Data Field: Title
  • Format as: Hyperlink

6) Amend the rest of the layout to suit your design.

Thanks Michael!

SharePoint Designer 2007 Now Available for Free!

April 3, 2009

Exciting news, Microsoft are making SharePoint Designer 2007 as a free download.

Word from Microsoft:

  • Starting on April 1, 2009, we are making SharePoint Designer 2007 available as a free download.
  • Customers with SharePoint Designer 2007 Software Assurance (SA) current as of April 1, 2009 will receive upgrade rights to Expression Web for the lifetime of their SA agreement.
  • Creating Virtual Earth Map using SharePoint Designer

    March 23, 2009

    If you have a massive ERP or CRM system with hundreds of customers or client addresses, wouldn’t it be nice to see a lovely map of where they are located… anywhere in the world using Microsoft Virtual Earth?

    SharePoint Designer is an incredible tool to use!

    If you want to display a map underneath a display list which contains contact information, follow the step by step instructions given on this blog:

    Multiple addresses are plotted using LON and LAT co-ordinates, so that involves quite a bit if work. You can re-use the list as given in the link below, create a lon and lat column and generate the co-ordinates using

    Of course this is a long winded way to plot multiple data, you can simply change the parameters around to use address, zip code etc. instead.

    Follow this blog to get detailed instructions on the “how to”. I found it easier to create a simple aspx page with  no master page first. Then create a page view to link up from a “sharepoint” page to the unbranded page. I found that with custom design pages javascript may make the map in a strange funky format.

    Batchgencode was a great help.

    Please note, there are codeplex webparts available for virtual earth.. but this is the nice, handcoded version if you want to know the nitty gritty. Link to Codeplex.

    Displaying Fields in Content Query WebParts

    February 10, 2009

    Following my earlier post today, I explained how you can customise your CQWP.

    I had a series of articles which I wanted to see the article date and who the publishing contact person was, not the author as the author could be an admin person. So how did I get this done, with patience and lots of Googling!

    First, create the query and export to your desktop, open with notepad and amend the property CommonViewFields. For my own use, I needed the article date, not modified and the contact name. I had originally set the contact name as text, that is wrong, it should be a LookUp as contact names are entered using a people picker in the original article page.

    <property name=”CommonViewFields” type=”string”>ArticleStartDate,DateTime;PublishingContact,Lookup</property>

    Next step is to amend the itemstyle.xsl.

    Add   xmlns:ddwrt=”” to the header so that the date is passed through.

    I copied the first template and renamed the name (as per Microsoft blog).

    First, define the variable for the PublishingContent element.

    <xsl:variable name=”PublishingContact”>
           <xsl:call-template name=”OuterTemplate.GetGroupName”>
               <xsl:with-param name=”GroupName” select=”@PublishingContact”/>
               <xsl:with-param name=”GroupType” select=”‘PublishingContact'”/>

    In the first   <div class=”description”>, you have to declare what you want the content web part to display. The script is:

    <xsl:value-of select=”ddwrt:FormatDateTime(string(@ArticleStartDate) ,1033 ,’d/M/yyyy’)” />
    Created by – <xsl:value-of select=”$PublishingContact”>

    Make sure you check in the file as a minor and preview your changes on your web page. . all should be fine.

    Hope this helps someone!!

    Content Query Web Part Date Format

    February 10, 2009

    Firstly, follow Heather Solomon’s blog on a great how to customise the content query web part. Essentially, you need to allow the webpart to expose itself to whatever information you need it to display.

    I had a roll up of information, which ideally I needed the article date to display on the page.


    Follow on to the MSDN blog which is found within the above link (

    I managed to get what I wanted… but in an American date and time format, which was a big no no for me.

    Fortunately, there was a post on the SharePoint User Group forum for UK members.

    All you need to do is edit itemstyle.xsl to include xmlns:ddwrt=”  as a reference on the top header and amend the description tag to <xsl:value-of select=”ddwrt:FormatDateTime(string(@Modified) ,1033 ,’d/M/yyyy h:mm tt’) />

    You can remove the time, amend the date as you wish.

    If you do unfortuantly break your SharePoint site with any mistakes, not to worry, reset to the site definition using SharePoint Designer.

    Any questions let me know!

    ‘An error occurred processing the data view. The XslText property is empty’

    February 9, 2009

    I had the above error in my beautifully styled out data view, the problem was that I had accidently inserted another empty data view, once removed, the page was completly fine.

    Lesson learned: Don’t click too many times when inserting data views 🙂