I created a list in a SharePoint 2013 App and the Schema.xml contains the following node related to the AllItems view.
<View BaseViewID="1"
Type="HTML"
WebPartZoneID="Main"
DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;"
DefaultView="TRUE"
OrderedView="TRUE"
MobileView="TRUE"
MobileDefaultView="TRUE"
SetupPath="pages\viewpage.aspx"
ImageUrl="/_layouts/15/images/generic.png?rev=23"
Url="AllItems.aspx">
I'd like to replace SetupPath="pages\viewpage.aspx
with my own page, so I can brand it as per my client's requirements. I've already created my Pages\CustomViewPage.aspx
, but I cannot figure out how to reference my custom page.
I've tried the following attributes. I replaced SetupPath
with Path
, see View Element (List):
<View BaseViewID="1"
Type="HTML"
WebPartZoneID="Main"
DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;"
DefaultView="TRUE"
OrderedView="TRUE"
MobileView="TRUE"
MobileDefaultView="TRUE"
Path="~site/pages/customviewpage.aspx"
ImageUrl="/_layouts/15/images/generic.png?rev=23"
Url="AllItems.aspx">
If I use Path="~site/pages/customviewpage.aspx"
or Path="../pages/customviewpage.aspx"
, the application cannot be deployed and the error is not very helpful (SharePoint Online):
@"Error 1
CorrelationId: aedf6556-ac09-4b0e-9367-905c81563a57
ErrorDetail: There was a problem with activating the app web definition.
ErrorType: App
ErrorTypeName: App Related
ExceptionMessage: <nativehr>0x80131600</nativehr><nativestack></nativestack>
Source: AppWeb
SourceName: App Web Deployment
Error occurred in deployment step 'Install app for SharePoint':
Failed to install app for SharePoint. Please see the output window for details.
If you know how to reference your own custom ListView page, please drop me a line. Thank you.