0

Is it possible to use the call SP.Navigation.set_useShared(true) to inherit the top link bar in the javascript to create a sub site?

1
  • It's unclear what you're asking, are you talking about inheriting the top navigation or creating a sub site?
    – John-M
    Oct 23, 2015 at 0:45

1 Answer 1

0

You can do it using sp.publishing.js

var webNavSettings = new SP.Publishing.Navigation.WebNavigationSettings(context, currentWeb);
var navigation = webNavSettings.get_globalNavigation(); 
navigation.set_source(3);     
webNavSettings.update();         
context.executeQueryAsync(function(){   alert("Navigation Modification Successful");         },function(sender,args){       alert(args.get_message());       });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.