In the process of customizing a mobile app created using the Mobile Application Builder for Zimbra Community, a new page/screen of content may be required. This guide walks through the steps of creating a new page and linking to that page from within a widget.
As an example, to create a welcome page, the following configuration file could be defined and placed within the Resources/ folder of the web server components of the Mobile Application Builder:
<page name="welcome" path="welcome">
Saving this example to a new file, Resources/welcome.xml, will add the welcome page to the application. The page named "welcome" is accessible by navigating to /welcome within the application (see "Linking to the Page" below for show to generate this link).
As defined, this page will have no content. This doesn't make the app unusable because the navigation panel and header are always present and provide a way for the user to navigate to other pages, but it also isn't useful. Normally, one or more widgets would be defined within the page.
Now that a page exists, the application should provide a way to navigate to the page. This is normally done within a widget. The mobile_v1_url widget extension can be used within a widget to link to pages.
To link to the welcome page created in the previous section, the following velocity script could be used within a widget's implementation:
This would render the URL of the welcome page. To make that a link, the following script could be used:
Go to the welcome page