Define $actionButton before including the native Form View or Table View. Each array describes one action beside the page heading.
$actionButton = [[
'link' => getPath([
'menuName' => 'CATALOG', 'submenuName' => 'ITEMS',
'pageName' => 'ADD ITEM', 'optiontype' => 'FA'
]),
'text' => 'Add item', 'icon' => '<i class="fas fa-plus"></i>',
'id' => 'add_item', 'target' => '_self',
'class' => '', 'attributes' => ''
]];
Use actual registered route names. Supported properties are link, text, icon, id, target, class and attributes. IDs default to AB0, AB1 and so on; an omitted array target emits no target attribute. Choose _self or _blank explicitly. A link/action is not an authorization check.
Page-owned client action
$actionButton[] = ['text' => 'Show details', 'id' => 'show_details'];
$('#show_details').on('click', function () {
// Invoke the owning page's existing client action.
});
Omit link for a client action and bind its explicit ID. Ordinary save operations still use native form submission. The imageGallery/videoGallery shortcuts identify their native page and option string; previewURL identifies the public preview. Keep their schema columns and route names page-owned.
$imageGallery = 'ARTICLE IMAGES:VIMPLD'; $videoGallery = 'ARTICLE VIDEOS:FZVTPLD'; $previewURL = 'article:en:BLOGID:title_en';
Legacy colon-delimited actions remain supported: link:text:icon:id:target. Prefer arrays, especially when URLs or attributes contain delimiters.
Full arrays are the modern extensible configuration. Strings remain supported legacy shorthand/quick syntax. Prefer full arrays for new definitions; use only keys supported by the owning field or component.
Related native actions
Section-level $actionButton, per-row $rowActions and selected-row bulk controls have different configuration and scope. Use Native Table View custom row actions for the complete manual-action array, placeholders, icons, tooltips, conditions, disabled states, confirmation, keyboard access and its relationship to Edit, Delete and Clone. Full arrays are the modern extensible format; strings remain compatible legacy shorthand. Each destination must authorize its request independently.