Home › How do I…? › How to add a page to the menu
How to add a page to the menu
Advanced Framework Pro's menu is data-driven: a page is a widget plus a PDA_WidgetPage data asset listed on the pawn's BPC_Pawn_Menu. One entry adds the page to the menu on every platform. By the end of this you will have a new page in the main menu, in VR, on desktop and on mobile.
At a glance
Your page widget parent WBP_Base
DA_WidgetPage_<Name> PDA_WidgetPage: Widget = your widget class, Button = label + icon
Your pawn
└─ BPC_Pawn_Menu Pages += DA_WidgetPage_<Name> (the menu, every platform)
└─ BPC_Pawn_Sidebar Pages += DA_WidgetPage_<Name> (optional: the desktop sidebar)
Steps
- Create a widget deriving from
WBP_Basefor your page content. - Create a
PDA_WidgetPagedata asset. Set Widget to your widget class and fill in Button with the label and icon. - Open your pawn and find its
BPC_Pawn_Menucomponent. - Add an entry to Pages and reference your new page data asset.

howto_menupage_01.pngThe page data asset

AFS_UI_Menu_vr.pngThe page in the VR menu
Notes
Because the page is referenced by data asset rather than by the menu widget, the same page appears
in WBP_Menu on every platform without further work. To show it in the desktop sidebar
(WBP_Sidebar) as well, add the same entry to the pawn's BPC_Pawn_Sidebar.