Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'am back again with another question. I have a Pagelayout and want to add a Content Query Webpart as Menu. I created a Webpartzone and added a Webpart.

<WebPartPages:WebPartZone id="g_91F45F969948455D914881221F1D2D85" runat="server" title="Zone 1">
<PublishingWebControls:ContentByQueryWebPart runat="server" DataSourceID="" ChromeType="None" SuppressWebPartChrome="False" ListUrl="" MissingAssembly="Cannot import this Web Part." PageSize="-1" IsIncludedFilter="" ViewContentTypeId="" IsVisible="True" Title="Content Query" ZoneID="" AutoRefresh="False" FrameType="TitleBarOnly" ManualRefresh="False" ExportControlledProperties="True" ItemStyle="Default" ID="g_61e6b0bf_4133_49bd_b271_63ef74c6a695" ServerTemplate="" FrameState="Normal" PartOrder="2" ShowWithSampleData="True" AllowHide="False" SortBy="{8c06beca-0777-48f7-91c7-6da68bc07b69}" ViewFlag="0" UseSQLDataSourcePaging="True" PartImageLarge="" DataMappings="Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|Description:{691b9a4b-512e-4341-b3f1-68914130d5b2},ShortComment,Text;|ImageUrl:{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},EncodedAbsThumbnailUrl,Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},PublishingRollupImage,Image;|LinkUrl:{94f89715-e097-4e8b-ba79-ea02aa8b7adb},FileRef,Lookup;|" AllowMinimize="False" AsyncRefresh="False" InitialAsyncDataFetch="False" AutoRefreshInterval="60" Dir="Default" AllowZoneChange="True" PartImageSmall="" GroupStyle="DefaultHeader" IsIncluded="True" DetailLink="" Description="Displays a dynamic view of content from your site." SortByDirection="Desc" ExportMode="All" AllowEdit="False" ConnectionID="00000000-0000-0000-0000-000000000000" AllowConnect="True" ListId="00000000-0000-0000-0000-000000000000" AllowRemove="False" NoDefaultStyle="" HelpLink="" ListDisplayName="" __MarkupType="vsattributemarkup" __WebPartId="{61e6b0bf-4133-49bd-b271-63ef74c6a695}" WebPart="true" Height="" Width="" DataMappingViewFields="{94f89715-e097-4e8b-ba79-ea02aa8b7adb},Lookup;{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},Image;{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;{691b9a4b-512e-4341-b3f1-68914130d5b2},Text;" ContentTypeBeginsWithId="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D0026240B8F6727B74EB440B3C7C398ACB6" ShowUntargetedItems="False" GroupByDirection="Desc">
    <DataFields>
</DataFields><SampleData>
<dsQueryResponse>
                    <Rows>
                        <Row 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%20Library/XSL%20Style%20Sheets/Header.xsl" /> <xsl:import href="/Style%20Library/XSL%20Style%20Sheets/ItemStyle.xsl" /> <xsl:import href="/Style%20Library/XSL%20Style%20Sheets/ContentQueryMain.xsl" /> </xsl:stylesheet></Xsl>
</PublishingWebControls:ContentByQueryWebPart>

</WebPartPages:WebPartZone>

I enabled Demo-Mode.. tried exporting a existing webpart but nothing works.. I can see the CQWP in the Designer but not on the Webpage.. Yes i am editing the right :P, if i just type something and save it comes up...

Why is there nothing? Not even an error-message? If in set up the CQWP in the Browser this works.. but i have more then 10 Pages on which i need that..

share|improve this question
    
Does it show when you create a new page form that page layout? Even without the ZoneTemplate as mentioned below? –  James Love Oct 28 '11 at 16:58
add comment

1 Answer 1

up vote 1 down vote accepted

You probably forgot the ZoneTemplate tag.

<WebPartPages:WebPartZone PartChromeType="None" ID="Zone1" runat="server" Title="Zone1"> 
        <ZoneTemplate> 
                <MyTag:MyWebPart runat="server" PartOrder="1" ></MyTag:MyWebPart> 
        </ZoneTemplate> 
</WebPartPages:WebPartZone> 
share|improve this answer
    
Thank you .. worked! –  fr34kyn01535 Nov 2 '11 at 8:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.