Modify the Action Groups on an Existing Page
The AlterPageActionGroups and AlterOrAddPageActionGroups elements allow you to modify an existing page's action groups and add new action groups without directly editing the spec for that page. When you include the AlterExistingPages element on a spec, you can then include the child AlterPageActionGroups or AlterOrAddPageActionGroups elements to edit the action groups on the target page or to add new action groups.
For example, you can use the AlterPageActionGroups element and its child elements to remove an action from an action group. After you identify the page with its GUID in the AlterPage element's PageID attribute, you can insert the AlterPageActionGroups element. Then you can identify the action group to edit by its GUID in the AlterPageActionGroup element's PageActionGroupID attribute. Next, you can insert the AlterActions element. And finally, you can specify the action to remove by its GUID in the ActionID attribute of the RemoveActionGroupAction element.
<AlterExistingPages>
<AlterPages>
<AlterPage PageID="edafd74a-b523-4842-8fd7-6a925d232b58">
<AlterPageActionGroups>
<AlterPageActionGroup PageActionGroupID="80C5E1B1-B06E-4E11-B56B-07F5E98D0D74">
<AlterActions>
<RemoveActionGroupAction ActionID="0b79b3ec-6ba2-4b81-8ee8-185039018d11"/>
</AlterActions>
</AlterPageActionGroup>
</AlterPageActionGroups>
</AlterPage>
</AlterPages>
</AlterExistingPages>
With these lines in your new spec, you can remove an action from an existing page's action group without touching the spec for the page.
As another example, you may want to create an entirely new action group for the page. To do this, you can add the AlterOrAddPageActionGroups element instead of the AlterPageActionGroups element. You can then add the AlterOrAddPageActionGroup element and specify the caption and caption resource key for the new action group. Then to add an action to that action group, you can add the AddAction element. Within that element, you can insert an Action element to provide a caption and GUID for the new action. And within that element, you can specify what the action does. For example, you can add the BrowseQueryResults element to create an action that accesses query results and then provide GUIDs for the query and page in the QueryID and PageID elements.
<AlterExistingPages>
<AlterPages>
<AlterPage PageID="edafd74a-b523-4842-8fd7-6a925d232b58">
<AlterOrAddPageActionGroups>
<AlterOrAddPageActionGroup Caption="New Action Group" CaptionResourceKey="$$new_action_group">
<AddAction>
<Action Caption="New Action 1" ID="FC28DC55-7A2B-4F66-B97B-BC984D84B6F1">
<common:BrowseQueryResults QueryID="cea2345b-5d46-406d-8555-07e6d1f090b6" PageID="018522fb-6b34-4bac-a655-cf59607b561c"/>
</Action>
</AddAction>
</AlterOrAddPageActionGroup>
</AlterOrAddPageActionGroups>
</AlterPage>
</AlterPages>
</AlterExistingPages>