SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I deploy a custom welcome page for a site and on the page I have a content query web part. The problem I have is that I can't edit the web part once deployed. If I go edit page -> I can select the web part but can't click web part properties in the ribbon or if I click the Open tool pane link it says I do not have administrative permissions to change the web part (although I am the site collection admin). The code for the CQWP is:

<WebPartPages:WebPartZone runat="server" Title="loc:MiddleColumn" ID="MiddleColumn" FrameType="TitleBarOnly"><ZoneTemplate>                   
<WpNs0:ContentByQueryWebPart runat="server"  DataSourceID="" HelpMode="Modeless" ChromeType="TitleOnly" SuppressWebPartChrome="False" ListUrl="/Lists/Documents" MissingAssembly="Cannot import this Web Part." PageSize="-1" IsIncludedFilter="" ViewContentTypeId="" IsVisible="True" DataMappingViewFields="{94f89715-e097-4e8b-ba79-ea02aa8b7adb},Lookup;{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f},DateTime;{d31655d1-1d5b-4511-95a1-7a09e9b75bf2},User;" Title="Compliance Documents" ZoneID="Header" AutoRefresh="False" FrameType="TitleBarOnly" SortByFieldType="DateTime" ManualRefresh="False" ExportControlledProperties="True" ItemStyle="Documents" ID="g_7469c8a8_5022_4723_a718_035edc7c66fa" ShowUntargetedItems="False" ServerTemplate="10000" FrameState="Normal"  PartOrder="4" ShowWithSampleData="False" AllowHide="True" SortBy="Created" ViewFlag="0" UseSQLDataSourcePaging="True" PartImageLarge="" DataMappings="Modified:{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f},Modified,DateTime;|LinkUrl:{94f89715-e097-4e8b-ba79-ea02aa8b7adb},FileRef,Lookup;|Description:|ImageUrl:|Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|Editor:{d31655d1-1d5b-4511-95a1-7a09e9b75bf2},Editor,User;|" AllowMinimize="True" AsyncRefresh="False" InitialAsyncDataFetch="False" AutoRefreshInterval="60" Dir="Default" AllowZoneChange="True" PartImageSmall="" GroupStyle="DefaultHeader" IsIncluded="True" DetailLink="" ItemLimit="-1" 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" NoDefaultStyle="" HelpLink="" GroupByDirection="Desc" ListDisplayName="" __MarkupType="vsattributemarkup" WebPart="true" Height="" Width=""><DataFields>

                        <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" />
<xsl:stylesheet xmlns:x="" version="1.0" xmlns:xsl="" xmlns:cmswrt="" 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>

Sorry for the mess but is it something I am missing here? I have set AllowEdit to true.

Thanks in advance.

share|improve this question
up vote 1 down vote accepted

There are 3 approches to add web part to the page

  1. Add the web parts to the page programmatically via a feature receiver.
  2. Embed references to the web parts directly in the mark-up of the aspx page. But this is blocking modifications of the web part.
  3. The third approach, is to embed the webpart markup in “AllUsersWebPart” nodes in the modules elements.xml file.

For me the 3rd approach is the best. See this post for more details.

share|improve this answer
Also you can take a look at "…; – sssreddy Mar 14 '12 at 6:00

Your Answer


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.