locked
Custom Css for Content Query Web Part RRS feed

  • Question

  • Any kind of urgent suggestions are appreciated

    I need to change the styles for content query web part. What i have known is that css files  itemstyle.xsl and header.xsl  are avaiable to make the custom formattings. But i am unable to get the required style applied to content query web part.

    my code is shown as below:

     

    <WpNs0:ContentByQueryWebPart runat="server" DataSourceID=""
     HelpMode="Modeless" ChromeType="TitleOnly"
    SuppressWebPartChrome="False"
    MissingAssembly="Cannot import this Web Part."
    PageSize="-1" IsIncludedFilter=""
    ViewContentTypeId="" IsVisible="True"
     DataMappingViewFields="{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},
    Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},
    Image;{8553196d-ec8d-4564-9861-3dbe931050c8},
    File;{691b9a4b-512e-4341-b3f1-68914130d5b2},Text;"
     Title="Recently Modified Document" ZoneID="Header"
    AutoRefresh="False" FrameType="TitleBarOnly"
    SortByFieldType="DateTime" ManualRefresh="False"
     ExportControlledProperties="True" ItemStyle="
    Default" ID="g_84f4744a_d799_4e26_b7e0_382d734be8a6"
    ShowUntargetedItems="False" ServerTemplate="101"
    FrameState="Normal" PartOrder="2" ShowWithSampleData="False"
    AllowHide="True" SortBy="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}"
     ViewFlag="0" UseSQLDataSourcePaging="True" PartImageLarge=""
    DataMappings="
    LinkUrl:|Description:{691b9a4b-512e-4341-b3f1-68914130d5b2},
    ShortComment,Text;
    |ImageUrl:{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},
    EncodedAbsThumbnailUrl,
    Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},
    PublishingRollupImage,Image;
    |Title:{8553196d-ec8d-4564-9861-3dbe931050c8},FileLeafRef,File;|"
     AllowMinimize="True" AsyncRefresh="False" InitialAsyncDataFetch="False" AutoRefreshInterval="60" Dir="Default" AllowZoneChange="True" PartImageSmall="" GroupStyle="DefaultHeader" IsIncluded="True" DetailLink="" ItemLimit="5" UseCopyUtil="True" Filter1ChainingOperator="Or" WebUrl="~sitecollection" Description="Displays a dynamic view of content from your site." SortByDirection="Desc" ExportMode="All" AllowEdit="True" ConnectionID="00000000-0000-0000-0000-000000000000" AllowConnect="True" Filter2ChainingOperator="Or" ListId="00000000-0000-0000-0000-000000000000" AllowRemove="True" HelpLink="" GroupByDirection="Desc" __MarkupType="vsattributemarkup" __WebPartId="{84F4744A-D799-4E26-B7E0-382D734BE8A6}" WebPart="true" Height="" Width="">
    <DataFields> </DataFields> <SampleData> <dsQueryResponse> <Rows> <Row style ="color:red" Title="Item 1" LinkUrl="http://Item1" Group="Group Header" __begincolumn="True" __begingroup="True" /> <Row Title="Item 2" LinkUrl="http://Item2" __begincolumn="False" __begingroup="False" /><Row Title="Item 3" LinkUrl="http://Item3" __begincolumn="False" __begingroup="False" /></Rows>
    </dsQueryResponse></SampleData><Xsl><xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cmswrt="http://schemas.microsoft.com/WebPart/v3/Publishing/runtime" exclude-result-prefixes="xsl cmswrt x" >
    <xsl:import href="/Style Library/XSL Style Sheets/Header.xsl" />
    <xsl:import href="/Style Library/XSL Style Sheets/ItemStyle.xsl" />
    <xsl:import href="/Style Library/XSL Style Sheets/ContentQueryMain.xsl" /></xsl:stylesheet></Xsl> </WpNs0:ContentByQueryWebPart>




    Thanks in advanced.

     


    svsaichandra
    Tuesday, November 1, 2011 4:37 PM

Answers

  • Hi.

    To start with, .xsl files are not css files, .css files are css files :-)

    If you have done the xsl formatting by the book, perhaps it can be that easy that the files themselves are not checked in and approved? This can happen...

     

    Regards


    Thomas Balkeståhl - Technical Specialist - SharePoint
    • Marked as answer by Emir Liu Friday, November 11, 2011 10:10 AM
    Wednesday, November 2, 2011 9:44 AM