Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created April 28, 2017 17:14
Show Gist options
  • Save hishaamn/e22bc41c69fc144b20a1319c1016ba66 to your computer and use it in GitHub Desktop.
Save hishaamn/e22bc41c69fc144b20a1319c1016ba66 to your computer and use it in GitHub Desktop.
Sitecore SPEAK with Powershell
(function (Speak) {
Speak.pageCode(["sitecore", "jquery", "arcwaveUtils"], function (sitecore, $, Utils) {
return {
initialized: function () {
// your code for initialized
},
triggerSiteCreator: function () {
var app = this;
app.SiteGeneratorFrame.set("sourceUrl", "");
$.ajax({
type: "GET",
dataType: "json",
url: "/api/arcwave/sitecreator",
cache: false,
success: function (data) {
app.SiteGeneratorFrame.set("sourceUrl", data);
},
error: function () {
console.log("There was an error. Try again please!");
}
});
}
}
});
}) (Sitecore.Speak);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment