Page Life Cycle: Hello World Step - akumina/AkuminaTraining GitHub Wiki
Applies to
Akumina Foundation 3.4.0.0
Hello World Custom Step
We will create a custom function and add it as a custom step. When the Page Life Cycle reaches the step the alert will fire.
How to Deploy
- Download digitalworkplace.custom.js from the “/Style Library/DigitalWorkplace/JS” folder within SharePoint
- Paste the Code within digitalworkplace.custom.js
- Upload the updated digitalworkplace.custom.js to the “/Style Library/DigitalWorkplace/JS” folder within SharePoint
- Navigate to a page on your Digital Workplace site
- Flush your cache by clicking on the Akumina icon in the left rail, clicking the refresh icon, then clicking “Refresh All Cache”
- Refresh the page. The alert should fire.
Code
var AdditionalSteps = AdditionalSteps || {
}
if ((typeof AdditionalSteps.MoreSteps) === 'undefined') {
AdditionalSteps.MoreSteps = {
Init: function () {
console.log('AdditionalSteps.MoreSteps.Init');
var steps = [];
steps.push({ stepName: "Auto Clear Local Cache", additionalSteps: [{ name: "Hello World Step", callback: HelloWorld}] });
return steps;
}
}
}
function HelloWorld() {
alert("Hello World");
Akumina.Digispace.AppPart.Eventing.Publish('/loader/onexecuted/');
}
Result
References
To learn how to customize the Page Life Cycle using the Akumina Framework see the following articles: