Friends, Technology, Web2.0 - What I am reading

    [Home] [Recent] [Site Map]

   

Using a custom stylesheet for a custom Content Query Webpart

Using the following (3) links as reference:

They mention going to /Style Libary/XSL Style Sheets/ItemStyle.xsl and modifying. As Heather mentions, this unghosts the page. Not the most desirable behavior. Plus, any user that does this will now see that as an option in the Presentation node of the Content Query Web Part Toolpane.

So in the .webpart file that is exported, find the ItemXslLink property and change it to something like:
<property name="ItemXslLink" type="string">/Style Library/XSL Style Sheets/CustomItemStyle.xsl</property>

So here is what what my CustomItemStyle.xsl looks like:
<xsl:stylesheet
  version="1.0"
  exclude-result-prefixes="x d xsl msxsl cmswrt"
  xmlns:x="
http://www.w3.org/2001/XMLSchema"
  xmlns:d="
http://schemas.microsoft.com/sharepoint/dsp"
  xmlns:cmswrt="
http://schemas.microsoft.com/WebParts/v3/Publishing/runtime"
  xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
 <xsl:template name="MyTemplate" match="*" mode="itemstyle">
  <div style="background: red"><xsl:value-of select="@MyField" disable-output-escaping="yes"/></div>
    </xsl:template>
</xsl:stylesheet>


>>
Source Link
>>Blog: SharePoint Blogs
>>Publish Date: 6/3/2007 8:09:56 AM
>>Keywords: xsl http

Related Posts
>>MOSS2007 – Multiple columns in CQWP #
    Hi again. I am back to blogging now since having a little time to relax and chill.. You know how it is working on loads of projects!!! Anyway after receiving a couple of emails about displaying multip
>>Plotting Your Data Using Virtual Earth #
    Hello SharePoint Designer users, My name is Jon Campbell – I’m a developer for the SharePoint Designer team. My main job is to work on all things data oriented in SharePoint Designer. Today I thought
>>PowerShell: Verdi praterie #
    Una caratteristica di PS è la vastità di aree Windows che copre. In pratica se un framework, una applicazione o un sottosistema espone un modello (a oggetti) amministrativo in termini di classi .NET,
>>Customizing Sites In Category #
    By default site map was not set by sort order. I completed default sorting by title through editing xml file. You can edit properties of Site in Category web part in an editing page. Click the XSL
>>Why XML in Silverlight is Significant #
    I have been working with XML for most of my career, from developing a CAD application to my roles at Mindjet to my new role at Microsoft talking about Silverlight. In this career, I have given numero
>>MOSS2007 – CQWP Show and Hide like RSS Web Part #
    In one of the last posts I looked at customising the content query web part so it could display extra fields. Today I want to create some extra functionality using just XSL and JavaScript. In MOSS2007
>>W3C Publishes Eight New Standards in the XML Family #
    We have been waiting for this a few years now. W3C has announced the release of eight (8) Recommendations, representing some eight years of work by members of the W3C XSL Working Group and XML Query W
>>Custom Search Web Part #
    Been a while since my last post. Mostly because we have been working very hard to complete a custom search solution. The requirements for the solutions were: - Data from Treeview controls that is ente
>>Excluding Content Types from Search Results #
    I received a question recently about excluding certain items from the search results and thought it was worth a post. There are two main options that I thought of when asked. Firstly, editing the XSL
>>Adding additional properties to the MOSS People Search #
    I figured out how to add additional fields from the Profile Import into the People Search today. This requirement occured to me after discussing how this might be done with Aaron Saikovshi at the APA

Related Posts:
>>Event ID 202 - SharePoint Portal Administration Service
>>SPS 2003 Restore - The database schema is too old to perform this operation in this SharePoint cluster
>>Post Installation Tasks for MOSS 2007 and WSS 3.0
>>New MOSS Blog Site Created
>>Hidden treasure in WSS SDK
>>Windows Live Writer
>>Custom Navigation Tabs
>>Autenticación biométrica en SharePoint (Precise BioMatch)
>>Explore the SharePoint 2007 object model with Python
>>UK SharePoint User Group: June 2007 meetings
>>SharePoint 2007: Upload a Document with Its Meta-Data
>>Managed Property names


Month Archives:

Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Community News Web 2.0 Web2.0 Startups Search General Software Development Marketplace AJAX People Powered! myspace Microsoft Visual Studio Windows Vista Vista YouTube Silverlight MOSS Events WPF C# Featured News MOSS 2007 Office 2007 Tools Community General



@2007 All rights Reserved