Last active
December 15, 2015 00:19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ctx = new SP.ClientContext.get_current(); | |
var web = ctx.get_site().get_rootWeb(); | |
var props = web.get_allProperties(); | |
//Search Center Url | |
props.set_item("SRCH_ENH_FTR_URL","/sites/search/pages"); | |
//Search Scope Drop down option | |
props.set_item("SRCH_SITE_DROPDOWN_MODE","HideScopeDD_DefaultContextual"); | |
//Target Search Results page | |
props.set_item("SRCH_TRAGET_RESULTS_PAGE","/sites/Search/Pages/results.aspx"); | |
web.update(); | |
ctx.load(web); | |
ctx.executeQueryAsync(function () { | |
alert("Search Settings Modified"); | |
}, | |
function() { | |
alert("failed"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment