-
Notifications
You must be signed in to change notification settings - Fork 0
How to build and deploy a widget in ITV Administration console
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
Widgets
and then onWidgets
again. Search for%
in the id field to see all your widgets. Click theshow all
button to reveal them all and then check them all. Click on theDeleteSelected
button to delete all the widgets.
- Click on
Upload Widgets
button underWidgets
in the left menu. Click theChoose file
button. The.zip
file that contains the widgets are located inside thedist
ortarget
folder in yourwidgets
folder. Below you can se an example of the folder and the.zip
file. Click on theNext step
button 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 Group
dropdown. You can also choose a skin. Then click theDeploy selected
button.
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.