Administration panels are declared by adding an adminRoute
entry in the registry:
window.jahia.uiExtender.registry.add('adminRoute', 'test', { targets: ['jcontent:10'], label: 'ns:label.title', icon: <DefaultEntry/>, isSelectable: true, render: <MyComponent/> });
Administration panels accept the following properties:
targets
label
icon
toIconComponent()
(from @jahia/moonstone
, or window.jahia.moonstone
) to transform a path or an inline SVG to an icon component, for instance : icon: toIconComponent('<svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6V5A2 2 0 0 0 17 3H15A2 2 0 0 0 13 5V6H11V5A2 2 0 0 0 9 3H7A2 2 0 0 0 5 5V6H3V20H21V6M19 18H5V8H19Z" /></svg>')
or toIconComponent('https://image.flaticon.com/icons/svg/1973/1973617.svg')
isSelectable
render
iframeUrl
window.contextJsParameters.contextPath
). You can use $site-key
and $lang
placeholder. This is equivalent to the following:
render: function () {
return window.jahia.uiExtender.getIframeRenderer(window.contextJsParameters.contextPath + '/cms/adminframe/default/sites/$site-key.linkChecker.html');
}
requiredPermission
requireModuleInstalledOnSite
The target defines where the item will be added.
Settings can be added in:
administration-server
. See here for an example of a server administration panel declaration.administration-sites
. See here for an example of a site administration panel declaration.jcontent
. See here for an example of the declaration of a panel in the additional accordion.dashboard
. See here for an example of a dashboard panel declaration.If you want to add under an existing item, you can use <main-target>-<parent-item-key>
. For example administration-server-usersAndRole
creates a tree item in the administration accordion under the usersAndRole
entry.
Copyrights © 2002-2021 All Rights Reserved by Jahia Solutions Group SA