Hi Matteo,
Assuming you want to edit books individually, with their own form. In the old
days when migrating the data module to M5 (company app sample was similar
node-type-wise), we had one custom action building the correct DetailLocation
based on configured "sub-app mappings".
Nowadays (since 5.4.6 - MGNLUI-3774), there is
DelegateByNodeTypeAction(Definition), which configures a list of mappings to
arbitrary actions. Which means you basically need to configure as many
edit-item actions as node types you have + the delegating one. This might help
in particular for the actionbar's defaultAction. The rest you probably handle
already with actionbar availability, i.e. different sections per node-type,
don't you?
[code]editCompany:
class: info.magnolia.ui.contentapp.detail.action.EditItemActionDefinition
appName: company
subAppId: company
icon: icon-edit
availability: ...
editEmployee:
class: info.magnolia.ui.contentapp.detail.action.EditItemActionDefinition
appName: company
subAppId: employee
icon: icon-edit
availability: ...
editItem:
class:
info.magnolia.ui.contentapp.browser.action.DelegateByNodeTypeActionDefinition
nodeTypeToActionMappings:
- nodeType: mgnl:company
action: editCompany
- nodeType: mgnl:employee
action: editEmployee
[/code]
Both options would be valid imo, though arguably still a bit too much
verbose/boilerplate.
Cheers,
Mika
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=58da7f6a-1f75-4ba3-bb3f-1ee4d82c8d31
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------