I have provisioned a publishing page through a feature and andded an instance of a discussion board web part to the home page, this works fine. How can I make sure the web part chrome is set to TitleOnly?

<View List="Lists/Discussion" BaseViewID="3" WebPartZoneID="WebPartZone2" DisplayName="Discussion"/>

I have a document Library and it works fine but privioning the discussion board the same way results in a unknown error

<View List="Documents" BaseViewID="1" WebPartZoneID="WebPartZone1">
              <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                      <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
                      <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                          <property name="Title" type="string">Documents</property>
                          <property name="DisableViewSelectorMenu" type="bool">True</property>
                          <property name="InplaceSearchEnabled" type="bool">False</property>
                          <property name="ShowToolbarWithRibbon" type="bool">False</property>
                          <property name="ChromeType" type="chrometype">TitleOnly</property>

When provisioning Discussion Board it is required to specify ContentTypeID attribute for View element as demonstrated below:

<View List="Lists/Discussion" 
      ContentTypeID="0x012001" />

where ContentTypeID value is set to 0x012001 (RootOfList)

| improve this answer | |

My code was actually working correctly my issue ended up being that my pages were being provisioned before my list was actually available.

The pages were in a separate module that was being deployed as a feature which was included in a custom site definition, the solution was to move the pages into the same module as the site definition and deploy the pages withing the module element of the site definition onet.xml.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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