The following code is displaying my list...the baseview selected is the Calendar view i want but its displaying as a list. How to let SP know this should be displayed as a Calendar?

<View List="Lists/HR Transactions" BaseViewID="2" WebPartZoneID="Main" WebPartOrder="1">
                    <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="AllowConnect" type="bool">True</property>
                                <property name="Title" type="string">Staff Holiday Calendar</property>
                                <property name="AllowClose" type="bool">False</property>


1 Answer 1


Try setting the Type, Scope, and RecurrenceRowset properties as follows:

    List="Lists/HR Transactions" 
  • Hey Rich, I have that in the schema.xml as follows <View BaseViewID="2" DisplayName="Holiday Calendar" Type="CALENDAR" WebPartZoneID="Main" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/events.png" Url="calendar.aspx" RecurrenceRowset="TRUE" DefaultView="TRUE" ShowHeaderUI="TRUE" MobileUrl="_layouts/15/mobile/viewdaily.aspx"> you think i should try putting it in the element.xml?
    – Stephen
    Feb 15, 2013 at 15:36
  • I would start with the properties I've listed. Not all of the attributes of the schema's View element are supported for a module's View element. See View Element (Module) for a full list (note that CALENDAR isn't listed as an option for type, but I've seen examples where it works). Feb 15, 2013 at 15:40
  • Thanks for that Rich, tried it with no luck...i'm running out of ideas!
    – Stephen
    Feb 15, 2013 at 15:44
  • I can tell this definitely works for Modules sections within an onet.xml file for SP 2010. Maybe it doesn't work in a feature separate from a site definition or maybe it is different in SP 2013. But I would think it should work. Feb 15, 2013 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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