Inherit Top Link Bar While Creating Sub Site using JavaScript object module

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/160393

  •  06-10-2020
  •  | 
  •  

Вопрос

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?

Это было полезно?

Решение

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());       });
Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top