Sharepoint 2013 Apps Chrome Control

I am trying to setup a chrome control in a SharePoint App. I have followed https://msdn.microsoft.com/en-us/library/office/fp179916.aspx

I seek your help to understand two concepts here.

1) I am declaring my chrome control using declarative approach. How do I pass the HostUrl Token to my help page or other pages that are defined in the navigation links. The referred article contains a video on MSDN hardcodes the siteUrl property in declarative approach.

2) In case i have an aspx page how should i defined my own chrome control, suppose that my aspx is the start page for my application. And now i want to link to HTML  pages such as my Help.html etc

Thanks,

Saurabh Khatri


June 24th, 2015 7:12am

Hi Saurabh,

According to your description, my understanding is that you want use chrome control in a SharePoint App, we can use the following code to set navigation links.

var options = {
    "appIconUrl": "../Images/AppIcon.png",
    "appTitle": "Basic chrome control in apps for SharePoint 2013",
    "appHelpPageUrl": "Page3.html?" + document.URL.split("?")[1],
    "settingsLinks": [
        {
            "linkUrl": "Page1.html?" + document.URL.split("?")[1],
            "displayName": "Page 1"
        },
        {
            "linkUrl": "Page2.html?" + document.URL.split("?")[1],
            "displayName": "Page 2"
        }
    ]
};
var nav = new SP.UI.Controls.Navigation("chrome_ctrl_placeholder", options);
nav.setVisible(true);

Here is a blog for your reference:

Use the client chrome control in apps for SharePoint 2013

http://sp77.blogspot.com/2013/11/use-client-chrome-control-in-apps-for.html

Best Regards,

Dennis

Free Windows Admin Tool Kit Click here and download it now
June 25th, 2015 3:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics