|
|
||||||
|
#1
|
|
|
|
|
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: <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=5 252A6A8-096F-4F20- B321-4A04B2F8624C Export Web Part as a DWP: http://mindsharpblogs.com/todd/archi...10/25/789.aspx Deploying DWPs to a Web Part Page: http://mindsharpblogs.com/todd/archi...08/04/646.aspx Creating Dataview of 'My Links'... : http://groups.google.co.uk/group/mic...fa3c125257dd45 Any help would be greatly appreciated. Thanks - Hannah |
|
|
|
#2
|
|
|
|
|
Chapter 5 of "Real World SharePoint 2007" is a chapter on using SPD 2007
to create Data View Web Parts. One of the examples there (from Dustin Miller) uses a Tasks List with conditional formatting so that if the Due Date is less than the Current Date and Status isn't equal to Completed then a field is set to red (in my test case to red + blinking). It's a very simple procedure and it sounds as if yours is a similar issue that could be solved in the same way. (Link to the book: http://www.amazon.com/exec/obidos/AS...0168358/heme0f (Amazon US)) Mike Walsh WSS FAQ www.wssfaq.com / wss.collutions.com no private e-mail questions please hannah wrote: [..] |
|
#3
|
|
|
|
|
Thanks Mike; unfortunately I don't have access to the book. Are you
able to explain the example? |
|
#4
|
|
|
|
|
What I was trying to indicate is that you can do this quite easily by
using a Data View Web Part. You have SPD 2007 so try to use the Data menu item to create (on default.aspx for instance - or another web part page) a Data View Web Part that gets its information from the list where you have this status part. You'll see that by right-clicking an item in a column you can set conditions for that column (which may include conditions for other columns as in my previous text) and then when the conditions are complete you'll be given a screen where you can say which colour to apply if the condition is fulfilled. (Please always quote the previous parts of the thread. Luckily I could still remember this one) Mike Walsh hannah wrote: [..] |
|
#5
|
|
|
|
|
Many thanks for that.
I see what you mean - but im not sure this solves the issue because i still need to detach the page from the page layout to be able to add the data view web part in SharePoint Designer. This method achieves the same outcome as converting the original web part to XSLT view and adding in the styles as in my first post and works well as such. I wonder if there is a way to be able to add in a column to the actual data source so that the colour / icons are used through out the web part output, ie in the actual form library? Hannah On 24 Oct, 17:24, Mike Walsh <englantilai> wrote: [..] |
|
#6
|
|
|
|
|
For anyone else following this there are details on adding conditional
formatting to a data view here: http://office.microsoft.com/en-us/sh...996241033.aspx On 24 Oct, 17:24, Mike Walsh <englantilai> wrote: [..] |
|
|
| Similar Threads | |
| Export Project Server 2007 web parts to MOSS 2007 sites failure Hi, Any help on the following appreciated: In a development environment, with EPM (Project Server 2007) and MOSS 2007 installed as part of the same server farm, we have... |
|
| 2003 Web parts on MOSS 2007 Good evening everyone: We have several Framework 1.1 web parts that have been written and are in use on our SPS 2003 implementation of Sharepoint. Does anyone know for... |
|
| MOSS 2007 question: How to Make a Custom Timer Job and register this job into MOSS 2007 ? This is a difficult task. I see that there is a SPJobDefinition class to define a job. When my class inherit's from this class and I override teh Execute() method I will get... |
|
| Importing and Exporting custom dictionary in Word 2007 I installed the Office 2007 Beta over an older 2003 version, and the dictionary came along nicely. But when I installed the 2007 on another machine, the dictionary didn't... |
|
|
All times are GMT. The time now is 06:23 PM. | Privacy Policy
|