How to build and deploy a widget in ITV Administration console - 24i/fokuson-developer-portal GitHub Wiki
This simple tutorial will guide you through the steps on how you can build and deploy a widget in the ITV Administration Console so that you can see it in your portal and make the changes you want.
Once you created a widget using using widget creator (npm run create) or in any other way, it needs to be build.
You can build all your widgets by running ./gradlew grunt -Pcmd="build-webpack --profile=<profile> --onlyBuildAssemblyWidget=false" in your terminal in widgets directory, replacing by your wanted profile e.g. "revo2". Remember that you need to build and restart your widget development server - WDK - by running npm start every time you are creating a new widget.
-
First you need to have you widget development server - WDK - and your proxy of the client-portal up and running. Instructions on how to do that you can find here.
-
Go and login to ITV Administration Console. On the left menu click on
Widgetsand then onWidgetsagain. Search for%in the id field to see all your widgets. Click theshow allbutton to reveal them all and then check them all. Click on theDeleteSelectedbutton to delete all the widgets.

- Click on
Upload Widgetsbutton underWidgetsin the left menu. Click theChoose filebutton. The.zipfile that contains the widgets are located inside thedistortargetfolder in yourwidgetsfolder. Below you can se an example of the folder and the.zipfile. Click on theNext stepbutton and thenSave.
#!pre
widgets/
dist/
zips
appletv/
demo-widgets/
fokuson/
fokuson-react/
fokuson4/
multi-screen/
widgets-master-r1.zip
- Select all the widgets as before in step 3. Select a customer group on the
to Customer Groupdropdown. You can also choose a skin. Then click theDeploy selectedbutton.
You can choose to deploy only one widget if you wish. You find all the widget .zip files for each widget separately under the zips folder in your dist folder.
You can always show a widget by running in your browser's console the following command.
#!bash
fokusEnv.widgetManager.showWidgetByWidgetId('NameOfTheWidget')
Moreover you can add your widget in the menu that appears in the portal. On ITV administration console go to Widgets Content -> Launcher Menu. Click on your active launcher menu and then edit in order to add the widget to the menu. Add a line of code with your responsive widget’s id as can be seen below.

For widgets created for Set-top boxes you can also choose a hotkey by the time you deploy it.