Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Does anyone know of an example to get the action menu to appear in a custom section view using the umbEditorHeader directive?
Trying to create the correct "menu"
https://our.umbraco.org/apidocs/ui/#/api/umbraco.directives.directive:umbEditorHeader
<umb-editor-header name="vm.Name" tabs="vm.content.tabs" hide-alias="true" hide-description="true" hide-icon="true" menu="vm.content.menu"> </umb-editor-header>
Directive File:
https://github.com/umbraco/Umbraco-CMS/blob/e0025db56d52b770d2b3aedbd48a3b804fd15ef0/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js
Hi John,
Do you have any actions set on your item ? I think if you set them on the tree node they will automagically appear :-)
Dave
Hi Dave,
I have items set on the menu. Might be missing something but not sure it's that simple as it's a bespoke view in a custom section.
John
I was totally wrong. Just checked a PR on Umbraco where I know I had this working.
In your controller you need to add this :
vm.page.menu = {}; vm.page.menu.currentSection = appState.getSectionState("currentSection"); vm.page.menu.currentNode = null;
You will probably load some data from your backend. When handling the response you need to do this :
editorState.set(data); navigationService.syncTree({ tree: "your tree alias", path: data.path, forceReload: true }).then(function (syncArgs) { vm.page.menu.currentNode = syncArgs.node; });
See this for a reference : https://github.com/umbraco/Umbraco-CMS/pull/2159/files#diff-c02e14235b6e9f06b1c27c454dc7049c
Then in your view :
<umb-editor-header name="vm.Name" tabs="vm.content.tabs" hide-alias="true" hide-description="true" hide-icon="true" menu="vm.page.menu"> </umb-editor-header>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Creating Action Menu in Custom Section View
Hi,
Does anyone know of an example to get the action menu to appear in a custom section view using the umbEditorHeader directive?
Trying to create the correct "menu"
https://our.umbraco.org/apidocs/ui/#/api/umbraco.directives.directive:umbEditorHeader
Directive File:
https://github.com/umbraco/Umbraco-CMS/blob/e0025db56d52b770d2b3aedbd48a3b804fd15ef0/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js
Hi John,
Do you have any actions set on your item ? I think if you set them on the tree node they will automagically appear :-)
Dave
Hi Dave,
I have items set on the menu. Might be missing something but not sure it's that simple as it's a bespoke view in a custom section.
John
Hi John,
I was totally wrong. Just checked a PR on Umbraco where I know I had this working.
In your controller you need to add this :
You will probably load some data from your backend. When handling the response you need to do this :
See this for a reference : https://github.com/umbraco/Umbraco-CMS/pull/2159/files#diff-c02e14235b6e9f06b1c27c454dc7049c
Then in your view :
Dave
is working on a reply...