-
Notifications
You must be signed in to change notification settings - Fork 7
Page Life Cycle: Adding Custom Steps (3.3.0.0)
THE INFORMATION IN THIS ARTICLE IS OBSOLETE AS OF 3.4.0.0
Digital Workplace 3.3.0.0
In our code, we can add a custom step after a core step using the format below
Akumina.Digispace.Loader.AddStepsAfter("<CoreStepName>", [{ name: "<NewStepName>", callback: <NewStepFunction> }]);
Replace this with the name of the Core Step you are adding after, ie “Auto Clear Local Cache”. They are listed under the Core Steps section.
Replace this with the name of your new step
Replace this with the name of the function that executes your step code.
Akumina.Digispace.Loader.AddStepsAfter("Auto Clear Local Cache", [{ name: "My First Step", callback: MyFirstStep }]);
Akumina.Digispace.Loader.AddStepsAfter("Auto Clear Local Cache", [{ name: "My Second Step", callback: MySecondStep }]);
The situation above where we add two new steps after the same step will not work. When this happens the second step added will overwrite the first. The correct way to handle this situation is to “chain” these steps, by adding the second step after the newly added first step, as shown below.
Akumina.Digispace.Loader.AddStepsAfter("Auto Clear Local Cache", [{ name: "My First Step", callback: MyFirstStep }]);
Akumina.Digispace.Loader.AddStepsAfter("My First Step", [{ name: "My Second Step", callback: MySecondStep }]);
Note: If you are doing customizations on a Digital Workplace Site you must take note of the Shipped Site Steps when adding new custom step. These steps are incorporated by Akumina.Digispace.Loader.AddStepsAfter and you need to be careful not to overwrite them when adding additional steps.
In our digitalworkplace.custom.js we will need to create an AdditionalSteps object that will initialize our custom steps in the Page Life Cycle.
var AdditionalSteps = AdditionalSteps || {}
if ((typeof AdditionalSteps.MoreSteps) === 'undefined') {
AdditionalSteps.MoreSteps = {
Init: function () {
console.log('AdditionalSteps.MoreSteps.Init');
//Add Custom Steps Here
}
}
}
This line calls the Init function of all objects grouped under AdditionalSteps
This defines the AdditionalSteps.MoreSteps object. We can create additional objects under AdditionalSteps called whatever we want, ie AdditionalSteps.MyAdvancedSteps, AdditionalSteps.HelloWorld, AdditionalSteps.ProgrammingIsFun, and their Init functions will all be called
This is Init function for the AdditionalSteps.MoreSteps object. Here is where we want to add our custom steps.
To learn how to customize the Page Life Cycle using the Akumina Framework see the following articles:
- Building a Custom Widget: Overview
- Building A Custom Widget: Hello World Widget
- Building A Custom Widget that accesses SharePoint Lists
- Building A Generic List Control Widget
- Custom Widget: SP Sites List
- Building A Custom Widget: Angular Stock Ticker Widget
- Building A Custom Widget: Flickr Image Library
- Building A Custom Widget: Stock Ticker Widget
- Building A Custom Widget that Accesses a List
- Building A Custom Widget: Yammer Widget
- What's in the Core Site?
- Troubleshooting in the Core Site
- Building your first widget
- Building a Custom Masterpage
- Building a Page Layout
- Applying Custom Styles
- Widget Manager: Overview
- Widget Manager: Retrieving View Icons
- Widget Manager: Adding an Existing Widget to a Page
- Widget Manager: Creating a Custom View for an Existing Widget
- Building a Customdataload Callback: Accessing a List
- Building A Customdataload Callback: Accessing a List from a Different Site
- Building A Customdataload Callback: Hello World
- Building a Customdataload Callback: Overview
- Building A Customdataload Callback: Third Party Data
- Changing the Loading View of a Widget
- Multilingual widget instances
- Search: Displaying search results with the GenericSearchList widget
- Upgrading Widget Snippets: Overview
- Upgrading Widget Snippets: Updating a Custom Built Widget Snippet
- Upgrading Widget Snippets: Updating an OOB Widget Snippet
- View Creation: Handlebars
- View Manager: Creating a Custom View
- Widget Development Process: Widget Decision Tree
- Widget Development Process: Widget Design Use Cases
- Eventing: OOB Digital Workplace Events
- Eventing: Overview
- Framework Integration Points
- Framework: ConfigurationContext
- Framework: UserContext
- Generating a HAR file for troubleshooting performance
- Getting List Items with JSOM
- Masterpage: Enabling a Custom Masterpage to work with the Akumina Widget Framework
- Multilingual tokens
- Multilingual: Akumina Framework language awareness
- Page Life Cycle: Overview
- Page Life Cycle framework: execution steps
- Page Life Cycle: Accessing a List
- Page Life Cycle: Accessing a List (3.3.0.0)
- Page Life Cycle: Accessing UserContext
- Page Life Cycle: Accessing UserContext (3.3.0.0)
- Page Life Cycle: Adding Custom Steps
- Page Life Cycle: Adding Custom Steps (3.3.0.0)
- Page Life Cycle: Akumina Foundation Shipped Site Steps
- Page Life Cycle: Appending Additional Markup
- Page Life Cycle: Appending Additional Markup (3.3.0.0)
- Page Life Cycle: Core Steps
- Page Life Cycle: Hello World Step
- Page Life Cycle: Hello World Step (3.3.0.0)
- Page Life Cycle: Optimizing Page Load Performance
- People Sync: Overview
- People Sync: Adding Attributes to the People Directory View
- People Sync: Creating a Custom Data Source
- People Sync: Custom User Processor
- Using the Debug Panel
- AppManager: Enabling Load Balancing
- Deployment Manager: Overview
- Deployment Manager: Adding A Custom Site Definition
- Deployment Manager: Core Step Classes
- Deployment Manager: Custom Site Definition Components
- Deployment Manager: Custom Site Definition XML
- Deployment Manager: Custom Subsite Definitions
- Deployment Manager: Sample Step Code
- Deployment Manager: Supported Tokens
- Performance Considerations
- Production Settings: Disabling debug mode
- Akumina Foundation Site
- Akumina Multilingual vs Variations
- Caching: Modifying Site Caching
- Caching: Modifying Widget Caching Settings
- Managing Widget Load Priority
- Theme: Adding a New Rail Icon
- Theme: Changing the Theme of an Akumina Foundation Site
- Theme: Customizing Rail Icons
- Theme: Modifying an Akumina Foundation Theme