Skip to main content
added 3 characters in body
Source Link

It’s possible to hide Ribbon Toolbar tabs from both JS API or from Editor configuration file. Taking into account requirement to hide tabs depending on user permissions, it’s only possibly to do from JS API. I don’t have example, but to create extension you have to do the following steps:

  1. Create new extension Editor doc
  2. Create js file with functionality which will:

2.1. Check current user permissions

var user =                 $models.getItem(Tridion.ContentManager.UserSettings.getInstance().getUserId());
// load user is not loaded and check permissions

2.2. Hide toolbar tab if needed

var toolbar = $controls.getControl(toolbarElement, “Tridion.Controls.RibbonToolbar”); // Where ‘toolbarElement’ – reference to toolbar root DOM element
toolbar.hideItem(“WorkflowPage”); // Where ‘WorkflowPage’ – ID of the DOM element of the Ribbon Tab you want to hide
  1. Created functionality in js file have to be executed after View being initialized:

3.. Created functionality in js file have to be executed after View being initialized:

$evt.addEventListener($display, “start”, function() { … });
  1. Add this js file to corresponding view group as an extension.

4.. Add this js file to corresponding view group as an extension.

It’s possible to hide Ribbon Toolbar tabs from both JS API or from Editor configuration file. Taking into account requirement to hide tabs depending on user permissions, it’s only possibly to do from JS API. I don’t have example, but to create extension you have to do the following steps:

  1. Create new extension Editor doc
  2. Create js file with functionality which will:

2.1. Check current user permissions

var user =                 $models.getItem(Tridion.ContentManager.UserSettings.getInstance().getUserId());
// load user is not loaded and check permissions

2.2. Hide toolbar tab if needed

var toolbar = $controls.getControl(toolbarElement, “Tridion.Controls.RibbonToolbar”); // Where ‘toolbarElement’ – reference to toolbar root DOM element
toolbar.hideItem(“WorkflowPage”); // Where ‘WorkflowPage’ – ID of the DOM element of the Ribbon Tab you want to hide
  1. Created functionality in js file have to be executed after View being initialized:
$evt.addEventListener($display, “start”, function() { … });
  1. Add this js file to corresponding view group as an extension.

It’s possible to hide Ribbon Toolbar tabs from both JS API or from Editor configuration file. Taking into account requirement to hide tabs depending on user permissions, it’s only possibly to do from JS API. I don’t have example, but to create extension you have to do the following steps:

  1. Create new extension Editor doc
  2. Create js file with functionality which will:

2.1. Check current user permissions

var user =                 $models.getItem(Tridion.ContentManager.UserSettings.getInstance().getUserId());
// load user is not loaded and check permissions

2.2. Hide toolbar tab if needed

var toolbar = $controls.getControl(toolbarElement, “Tridion.Controls.RibbonToolbar”); // Where ‘toolbarElement’ – reference to toolbar root DOM element
toolbar.hideItem(“WorkflowPage”); // Where ‘WorkflowPage’ – ID of the DOM element of the Ribbon Tab you want to hide

3.. Created functionality in js file have to be executed after View being initialized:

$evt.addEventListener($display, “start”, function() { … });

4.. Add this js file to corresponding view group as an extension.

Source Link

It’s possible to hide Ribbon Toolbar tabs from both JS API or from Editor configuration file. Taking into account requirement to hide tabs depending on user permissions, it’s only possibly to do from JS API. I don’t have example, but to create extension you have to do the following steps:

  1. Create new extension Editor doc
  2. Create js file with functionality which will:

2.1. Check current user permissions

var user =                 $models.getItem(Tridion.ContentManager.UserSettings.getInstance().getUserId());
// load user is not loaded and check permissions

2.2. Hide toolbar tab if needed

var toolbar = $controls.getControl(toolbarElement, “Tridion.Controls.RibbonToolbar”); // Where ‘toolbarElement’ – reference to toolbar root DOM element
toolbar.hideItem(“WorkflowPage”); // Where ‘WorkflowPage’ – ID of the DOM element of the Ribbon Tab you want to hide
  1. Created functionality in js file have to be executed after View being initialized:
$evt.addEventListener($display, “start”, function() { … });
  1. Add this js file to corresponding view group as an extension.