3

I am a new developer on sharepoint apps 2013. I have create a sharepoint apps project, with a few aspx page, and I don't know how to create a master page for my app (include sharepoint Left Navigation also). that is possible to do that? if can could you please advice me to do it.

Regards, Tola dy.

4

Create SharePoint hosted App by following below instruction:

  • Add new module with the name 'MasterPages' into your project solution.
  • Add new page with the name ‘CustomApp.master’ in ‘MasterPage’ module.
  • Open MasterPages -> Elements.xml file and make below changes.

Current Text:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <Module Name="MasterPages">
      <File Path="MasterPages\CustomApp.master" Url="MasterPages/CustomApp.master"/>
  </Module>
</Elements>

Text after Changes:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="MasterPages">
      <File Path="MasterPages\CustomApp.master" Url="_catalogs/masterpage/CustomApp.master"/>
 </Module>
</Elements>
  • Delete all the content from CustomApp.master page.
  • Open app.master page which is located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\GLOBAL
  • Copy entire content of app.master page and paste it in CustomApp.master page.
  • Open Default.aspx page in Source view mode, and change 'MasterPageFile' attributes value in Page directive from MasterPageFile="~masterurl/default.master" (current value) to MasterPageFile="~site/_catalogs/masterpage/CustomApp.master" (new value)
| improve this answer | |
  • excuse me could provide me a small sample project of this? I have try to do it many time but I don't see the effect. – tola Dec 26 '13 at 6:29

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.