- To learn more about the navigateParentURL() method, click here.
- This method can be configured in page elements such as widgets.
- This method is applicable to both C5 and C6 versions of Creator. Click here to find your current version.
- Create a widget
- Add widget to a page
2. Run the following commands to confirm that the installation was successful. The commands return the version of the package.
Note: When entering commands, there is no need to enter the dollar sign ($) explicitly; it will already be present by default. Commands can be run in Terminal for Mac OS and in Command Prompt for Windows.
- $ npm install -g zoho-extension-toolkit
Note: Use the following command in the event of any permission issues:
sudo npm install -g zoho-extension-toolkit
4. Run the following command to confirm that the installation was successful. It will return the version of the package.
5. Create a project using the following command:
Note: Use the following command in the event of permission issues:
sudo zet init
6. Select Zoho Creator.
7. Specify a project name. Hit Enter.
Note:
The project is basically a folder which is used to store files that are required to render the widget. It can contain only alphanumeric and underscore characters.
8. Type cd <project/folder_name> and hit Enter to navigate to the project directory.
9. Run the following command.
Note: This will run the HTTP server in your local machine in port number 5000. The port should not be occupied with any other process before starting the server. A relevant note may appear as a result of the above command.
10. To verify if the server has started successfully, navigate to widget.html and open it in a browser. The widget.html file will be present in the folder (project) created earlier.
Note:
By default, this file will be present in the App folder.
You can also access the widget.html file by following the below steps:
1. Open the local host URL (
https://127.0.0.1:5000) in a new tab and authorize the connection by clicking
Advanced->
Proceed to 127.0.0.1.
You should see the following screen:
11. Open the app folder in your project folder. Find the widget.html file in the same folder.
12. Enter your code in the widget.html file, save and download it. Any third-party app, for example Sublime, VS Code, or Eclipse, can be used to add or modify code in the html file. The widget.html file contains the structure, design, and components of the widget.
You can copy the below sample code in the
widget.html file to navigate to the
User Details form upon choosing the correct option inside the
Verify widget in
this example.
13. Navigate to the Settings page of the app in which you need to embed your widget. Select Widgets.
14. Click Create button.
15. The New Widget pane will appear.
16. Enter a name for your Widget.
17. Choose Internal option in the Hosting drop down list.
18. Upload the packed zip file from the dist folder in the Widget File field.
19. Enter /widget.html in the Index File field. The /widget.html file is the index file i.e., this file will be incorporated as the widget in your page.
20. Click Create. The created widget is added to the Widgets page.
21. This widget will appear as a drag-and-drop element in the page builder for all the pages present in your application.
Add widget to a page
1. Navigate to the Edit mode of your app.
2. Open the builder of the required page.
3. Select Widgets from the left pane. The created widget will appear.
4. Drag and drop the widget into the builder area.
5. Click Done to exit the builder.
Get started with sample data
To help you get started quickly, we've provided
sample data that you can download and use to start creating widgets!