Created
April 28, 2017 17:14
-
-
Save hishaamn/e22bc41c69fc144b20a1319c1016ba66 to your computer and use it in GitHub Desktop.
Sitecore SPEAK with Powershell
This file contains hidden or 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
(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