Akumina Developer Documentation

Akumina Developer Documentation

  • API
  • Docs
  • Blog

›Widget Builder

Akumina

  • Quickstart

Yo Akumina

  • Yo Akumina
  • Start with Yeoman
  • React
  • Simple template

Widget Builder

  • Widget Builder Structure
  • Akumina Widget Builder
  • Skipping instances
  • Token replacement for widget properties

Widget Development Quickstart

  • Setting up the Project
  • Configuring .env file
  • Configuring - akumina.sitedployer.config.json file
  • Configuring - akumina.config.json file
  • Extras

Widget Info

  • Akumina Widgets Overview
  • Building a New Widget Instance
  • Widget Views
  • Widget Properties
  • Global vs Local widgets (Widget Scoping)
  • Akumina React Widgets
  • Callbacks
  • RenderChildWidgets
  • Vendor Package List

Virtual Page Builder

  • Akumina Virtual Page Builder
  • Using Virtual Page Layouts
  • Creating a Custom Layout

Stream Card Builder

  • Installation
  • Stream Card Builder
  • Custom Cards
  • Activity Comments Config
  • Akumina Activity Stream PUSH Subscription using PowerAutomate to connect to ServiceNow
  • Akumina Activity Stream PUSH Subscription using PowerAutomate to connect to Dynamic 365

Site Deployer

  • Overview
  • Version 6.0
  • List Attribute Deployments
  • NPM Commands
  • SPA Updates and Deploying to multiple sites

Authoring

  • Content Action Event
  • Publish Validation Integration
  • Field Event Integration
  • CK Editor external plugins

Headless

  • Quickstart
  • Headless Teams support
  • Headless Troubleshooting

Modern

  • Overview
  • FAQ
  • Single Page Application
  • Modern Web Part Library
  • Google Analytics for Modern Pages

Site Creator

  • Overview
  • Adding A Custom Site Definition
  • Core Step Classes
  • Custom Site Definition Components
  • Custom Site Definition XML
  • Custom Subsite Definitions
  • Sample Step Code
  • Supported Tokens

Azure DevOps

  • CI/CD using Azure DevOps
  • Setting up a build to deploy a site package
  • Setting up a build to deploy file to App Manager hosted in an app service

Configuration

  • Configuration Context Overview
  • Edit the Redis cache timeout
  • Using a key vault for the client id and client secret

Debugging

  • Debugging in Akumina

Advanced

  • Central Site Collection Support
  • Eventing OOB Digital Workplace Events
  • Working with custom JSX Views
  • Page Indexing

Service Hub

  • Quickstart

Patch Notes

  • Patch Notes

Token replacement for widget properties

Token replacement for widget properties

In the event that you need to deploy property values based on external input rather than checking into source, you can use the following procedure.

See the scenario below where I don't want to hard code a value for my widget property 'myproperty' - I want this to be set during deployment. The value is set to '{replaceme}' which is the token I decided to invent for this example and is checked into source control.

config.json

 "Instances": [
        {
            "Name": "My SampleWidget",
            "Description": "Replace these tokens!",
            "Icon": "fa fa-cog",
            "Id": "dc721f53-6c32-7c82-e60e-76ea41290b5c",
            "Properties": [
                {
                    "name": "myproperty",
                    "value": "{replaceme}"
                }
            ],
            "SelectedView": "default",
            "AvailableViews": [],
            "HiddenFields": []
        }
    ],

In order to replace the '{replaceme}' token you would run the following command either locally or through Azure DevOps using variables.

npm run package -- --tokenMap "replaceme=thevalueiwant" 

Another Example using Multiple tokens '{url}' and '{anotherurl}' as it may be more applicable

 "Instances": [
        {
            "Name": "My SampleWidget",
            "Description": "Replace these tokens!",
            "Icon": "fa fa-cog",
            "Id": "dc721f53-6c32-7c82-e60e-76ea41290b5c",
            "Properties": [
                {
                    "name": "myproperty",
                    "value": "{url}"
                },
                 {
                    "name": "anotherproperty",
                    "value": "{anotherurl}"
                }
            ],
            "SelectedView": "default",
            "AvailableViews": [],
            "HiddenFields": []
        }
    ],
npm run package MyWidget -- --tokenMap "url=https://www.google.com;anotherurl=https://www.bing.com"   
← Skipping instancesSetting up the Project →
Akumina Developer Documentation
Docs
Akumina Framework 5.0Akumina Widget BuilderAkumina Yeoman GeneratorSite Deployer
Community
Akumina Community Site
More
GitHubStar
Copyright © 2024 Akumina