Friday 1 July 2016

Adding app part properties in SharePoint 2013 hosted apps

 <!-- Content element identifies the location of the page that will render inside the client web part
         Properties are referenced on the query string using the pattern _propertyName_
         Example: Src="~appWebUrl/Pages/ClientWebPart1.aspx?Property1=_property1_" -->

      <Content Type="html" Src="~appWebUrl/Pages/SponsorApplication.aspx?{StandardTokens}&amp;SponsorTitle=_SponsorTitle_&amp;SponsorItemID=_SponsorItemID_&amp;SponsorHistoryUrl=_SponsorHistoryUrl_&amp;SponsorHistoryUrl=_SponsorHistoryUrl_"  />

      <!-- Define properties in the Properties element.
         Remember to put Property Name on the Src attribute of the Content element above. -->
   
 <Properties>

      <Property Name="SponsorTitle" Type="string" RequiresDesignerPermission="true" DefaultValue="Sponsor" WebBrowsable="true" WebDisplayName="Sponsor Title" WebDescription="Sponsor_Title" WebCategory="Sponsor Properties" />

      <Property Name="SponsorItemID" Type="string" RequiresDesignerPermission="true" DefaultValue="" WebBrowsable="true" WebDisplayName="Sponsor Item Id" WebDescription="Sponsor_Item_Id" WebCategory="Sponsor Properties" />

      <Property Name="SponsorHistoryUrl" Type="string" RequiresDesignerPermission="true" DefaultValue="" WebBrowsable="true" WebDisplayName="Sponsor History Url" WebDescription="Sponsor_History_Url" WebCategory="Sponsor Properties" />

    </Properties>

No comments:

Post a Comment