This endpoint retrieves menus for a specified component, such as "header"
or "footer"
. It is commonly used to fetch menus for a particular component in your theme, typically for dynamically rendering navigation or other UI elements. While "header"
is the default component, you can specify "footer"
where needed.Payload#
The name of the component for which to fetch the menu, either "header"
or "footer"
Allowed values:headerfooter
Response#
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
Usage#
In the case of using
Header
, the developer can use the example below to receive the data.
Events#
The menu process may trigger two events during the menu process, onMenuFetched and onMenuFetchFailed.Triggered when the menus are successfully fetched.Triggered if there is an error during the fetching process. 
扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群Modified at 2025-02-20 07:53:20