Create a section with the design template that renders the native header in your
app. Use the template to add a custom header title and custom actions to the native
header. For example, add a button on the right side of the header that enables the users
of your mobile app to use the native search.
The native header provides the users with a responsive interface that is consistent
across native apps and different devices.
-
On the Create section form, specify the label, and then
click Create and open.
To ensure that the section works with the harness that you configured, the
Apply to and Add to ruleset
fields are populated with the class and ruleset of the harness.
-
On the Design tab, in the template elements pane on the
right, click Change, and then click the Mobile
page header with left and right action design template.
- Optional:
To add a custom title and improve the styling of the mobile header, configure
the properties of the Subtitle section:
-
In the Subtitle section of the template elements
pane, click the Edit icon.
-
In the Region properties window, select the
Override default region settings check
box.
-
In the Title list, select
Text, and then enter the custom title of your
header.
-
In the Container format list, select
Other, and then enter Mobile
header.
-
Click Submit.
- Optional:
To add left and right actions to the mobile header, in the Left
actions and Right actions sections of the
template elements pane, click the Add icon, and then
select an element that you want to use. For example, add a native search button
as the right action on the native header:
-
In the Right actions section, click .
-
Hover over the button, and then click the Edit
icon.
-
On the General tab, in the Image
source list, select Icon
class.
-
Click the Open the class picker icon to display
all available icons.
-
Search for and select the pi-search icon.
-
On the Actions tab, click Create an
action set.
-
Click .
-
Click , and then, in the Display
category, click Mobile search.
-
Click Submit.
-
Click Save.
Result: You can now reference the section in the header area of the
harness that you want to use to create a new page in your mobile app. The header of the
new page renders with a custom title and the right and left actions that you configured
in the mobile header design template.