Set Page info from Code
In this example we will show you how you can use the UI Builder Studio API to set the name and description of a Page
This can be useful, for example, if you want dynamically change the Name and Description of your Page using Javascript.
In the example below, we can navigate to the page by entering the Page ID and clicking "Read Page". this was done by utilizing the Playlist API. Upon clicking the "Read Page" button, the Name and Description textboxes are automatically filled. To replace the Page name and Description, click the "Set Page Name and Description" button, the existing Page name and description will be replaced with the content from the textboxes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
We can also set the page name and description on the onChange function of fields in the user interface. When the operator saves the page, these values will be set as the page name and description, allowing for a fast and automated workflow for the operator.
In the example below, we prefix the page name with an identifier, indicating to the operator the type of graphic, and the value from the "title" field.
1 2 3 4 5 6 7 8 9 |
|