hscott001

Hi

I have been following various blog posts about customising web parts to enable a project RAG status column using coloured icons in MOSS 2007.

This involves editing the web part in XSLT dataview though SharePoint Designer and adding the following code to the RAG column:

Code Block

<xsl:choose>
<xsl:when test="@RAG='Green'">
<img border="0" src="../images/green.gif"/>
</xsl:when>
<xsl:when test="@RAG='Amber'">
<img border="0" src="../images/amber.gif"/>
</xsl:when>
<xsl:when test="@RAG='Red'">
<img border="0" src="../images/red.gif"/>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
<!--<xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(string(@RAG))" />-->


It works just fine on my temp default2.aspx page but id like to get the web part exported and then imported into the web part gallery to avoid having to use a page which has been detached from the SharePoint page layout.

I have tried exporting the web part from SPD & also from the browser (Edit / Export), saving the .webpart file locally and then importing the .webpart file direct to the page & site gallery.

However, when i add the web part to the default.aspx page it throws an error and refers me back to the web part maintenance page to disable the offending web part.


Posts i have been looking at include:

Color Coding Fields in WebParts: msd2d.com/Content/Tip_viewitem_03NoAuth.aspx section=Sharepoint&id=5252A6A8-096F-4F20-B321-4A04B2F8624C

Export Web Part as a DWP: http://mindsharpblogs.com/todd/archive/2005/10/25/789.aspx

Deploying DWPs to a Web Part Page: http://mindsharpblogs.com/todd/archive/2005/08/04/646.aspx

Creating Dataview of 'My Links'... : http://groups.google.co.uk/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/77ece3e2f46825af/8dfa3c125257dd45 hl=en&lnk=st&q=xslt+dataview+sharepoint+2007#8dfa3c125257dd45



Any help would be greatly appreciated.

Thanks - Hannah


Re: SharePoint - Design and Customization Importing / Exporting Custom XSLT Web Parts

The Mossman

Can you post an example of the .webpart file you are trying to use Could be a lot of things, including a hard coded listid GUID that is different on the site you are trying to deploy to.