diff --git a/Products/zms/zpt/ZMSContainerObject/manage_main.zpt b/Products/zms/zpt/ZMSContainerObject/manage_main.zpt index afab9ee37..d831c571f 100644 --- a/Products/zms/zpt/ZMSContainerObject/manage_main.zpt +++ b/Products/zms/zpt/ZMSContainerObject/manage_main.zpt @@ -6,6 +6,7 @@ data-root python:here.getRootElement().getHome().id; data-client python:here.getHome().id; data-level python:here.getLevel(); + data-type python:here.attr('attr_dc_type') or nothing; id python:'zmsid_%s'%(here.id); class python:here.zmi_body_class(id='properties')">
zmi_body_header
diff --git a/docs/develop_api_exampels_en.md b/docs/develop_api_exampels_en.md index 3738dd31f..5a5e18c53 100644 --- a/docs/develop_api_exampels_en.md +++ b/docs/develop_api_exampels_en.md @@ -396,3 +396,16 @@ body.ZMSAuthor_special .zmi-action .dropdown-menu a.dropdown-item[title='ZMSLink } ``` For the ZMSAuthor the CSS snippet hides all the menu items besides "ZMSFile" and "ZMSLinkElement". + +### Other Attributes for Customizing the ZMI +As an alternative to the ZMS-Action *manage_css_classes* the meta-attribute `attr_dc_type` can be used to add a specific style to the ZMI. The attribute value will be added as a CSS-class systematically as `data-type`- attribute to the body-element of the ZMI. This is useful if the CSS-class is static and does not need to be changed by the ZMS-User. + +```css +body[data-type='News'] .zmi-action .dropdown-menu a.dropdown-item { + display:none; +} +body[data-type='News'] .zmi-action .dropdown-menu a.dropdown-item[title='News-Article'], +body[data-type='News'] .zmi-action .dropdown-menu a.dropdown-item[title='ZMSFolder'] { + display:block; +} +```