Adding Header Components to an OMX Web App (Store, OMS, Inventory etc)
Author:
Matt Salmon
Changed on:
24 July 2024
Key Points
- A step-by-step guide on how to add a custom help menu to the header to serve as inspiration for other custom components that can be added
Steps
Customise your app manifest
`fc.mystique.manifest.<web-app-name>`. Here is an example of how to add a customised OMS manifest:
Build out the custom help menu component
`ComponentRegistry.register(['custom.helpMenu'], HelpMenu, { category: 'content' });`
Next we will add the header field into our root level manifest
`header` field at the root level in the manifest. Multiple components can be added within the `desktop` and `mobile` fields. Here is an example of the `header` configuration:There is no limit to the number of components that can be added, so screen size should be taken into account. Adding too many components may overrun onto adjacent components.
Now we will configure the position of the help menu
`position` field. Alignment options include 'left', 'right', 'center', or 'centre'. The `position` field is not mandatory; if it is missing or contains an invalid option, the default alignment is 'left'.
Finally we will add the component configuration
`HelpMenu` component from the previous steps to the configuration. Because we want the help menu to be available on both desktop and mobile we add the configuration to both.
Results
And on mobile devices it will look like this:
Help menu animation:
