API: Customizing the mobile app navigation bar order

You can use Haiilo's API to customize the order of tabs in the mobile app's navigation bar.

By default, the mobile app orders the tabs in the order: Timeline, News, and any of your homepages that are activated for mobile, as long as the corresponding permissions have activated each tab: "Enable timeline module," "Enable news module," and "Enable homepages module."

You can learn more about the mobile app structure in the Homepages for mobile article.

homepage navigation in the mobile app.PNG

To make calls to the Haiilo API, you need to authenticate first. You can find detailed information about authenticating and using the API here.

Reorder the tabs in the navigation bar

When reordering the tabs, you can move either or both the Timeline and News tabs to the last position in the navigation bar. This means that if you'd like your homepages to show first, you need to move both Timeline and News to the end. The tab that displays after your homepages depends on which of the tabs you move first. It is recommended to complete the reorder in two API calls to ensure you achieve the order you want.

  1. Make a GET request to the endpoint /api/settings to get all the settings
  2. Copy the full JSON response
  3. Enter the copied response in the request body
  4. Add new parameters depending on which tab you want to move to be the last.
    • To move the Timeline tab to the end, add the parameter "mobileTimelineTabButtonAtEnd": true to the body
    • To move the News tab to the end, add the parameter "mobileNewsTabButtonAtEnd": true to the body
  5. Make a PUT request to the same endpoint to update the settings (previous and new parameters).

The settings are saved. The next time you open the mobile app, your changes should be visible.

Reset to the default order

You can reset the order to its default by following the steps above but setting the parameters to false.

Was this article helpful?