0

Hi,

I have a sandboxed solution with a feature to deploy:

  • Page layout
  • Page
    • Add webpart to page
      • Set JSLink property

Everything works as expected but i have a problem. The deployment proccess replace “~sites” with “/sites”, and then the webpart doesn’t load the JS file. I need to avoid the replace but i don’t know how to do it.

This is the XML of my module.

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/“>
<Module Name=”Pages” Url=”$Resources:cmscore,List_Pages_UrlName;” Path=”Pages” List=”116″ SetupPath=”SiteTemplates\SPS”>
<File Path=”Default.aspx” Url=”Home.aspx” Type=”GhostableInLibrary” ReplaceContent=”TRUE”>
<Property Name=”Stamp” Value=”B2bFile” Type=”string” />
<Property Name=”Level” Value=”Published” />
<Property Name=”PublishingPageLayout” Value=”~SiteCollection/_catalogs/masterpage/HomePage.aspx, ~SiteCollection/_catalogs/masterpage/HomePage.aspx” />
<Property Name=”ContentType” Value=”$Resources:cmscore,contenttype_welcomepage_name;” />
<Property Name=”ContentTypeID” Value=”0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4″ />
<Property Name=”Title” Value=”Welcome to the XXX public web site!” />
<View List=”Lists/News” BaseViewID=”1″ WebPartZoneID=”Header” ID=”WPListNews1″ WebPartOrder=”1″>
<![CDATA[
<webParts>
<webPart xmlns=”http://schemas.microsoft.com/WebPart/v3“>
<metaData>
<type name=”Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c” />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name=”Title” type=”string”>News 2</property>
<property name=”DisableViewSelectorMenu” type=”bool”>True</property>
<property name=”InplaceSearchEnabled” type=”bool”>False</property>
<property name=”ShowToolbarWithRibbon” type=”bool”>False</property>
<property name=”JSLink” type=”string”>~site/_catalogs/masterpage/CustomTemplate.js</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</View>
</File>
</Module>
</Elements>

(Visited 39 times, 1 visits today)
Add a Comment