Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.

 

Per Nergård
Oct 9, 2016
  2363
(1 votes)

Special editor toolbuttons for administrators

In one recent project I had the need to give the administrators some extra editor toolbuttons over the default set setup for the general editor. I googled a bit but didn't find exactly what I was looking for.

Finally I found an exaample in the documentation on how to create a global editor settings from code with the possiblity to add buttons for administrators. 

Ok so this seems to do the trick except that I wanted the SuperAdmins to be able to configure this from admin mode instead of having everything created from code.

So I solved this by defining two global settings via admin mode. On "Ordinary" for the general editor and one "ExtraOrdinary" for the admin editors and combining those in the global setting.

Code over at my gist

This is how it looks in admin mode:

1. Settings

Image Profiles_overview.jpg

2. Ordinary toolbars

Image Ordinary_buttons.jpg

3. ExtraOrdinary toolbars

Here the last toolbar contains a duplicate that already exists in the Ordinary setting.

Image extra_buttons.jpg

4. The result when looking in the code created profile logged in as an administrator.

Note that the duplicate link-button has been removed. If duplicates isn't removed the code doesn't work.

Image standard_result.jpg

Code over at my gist

Oct 09, 2016

Comments

Please login to comment.
Latest blogs
Level Up with Optimizely's Newly Relaunched Certifications!

We're thrilled to announce the relaunch of our Optimizely Certifications—designed to help partners, customers, and developers redefine what it mean...

Satata Satez | Jan 14, 2025

Introducing AI Assistance for DBLocalizationProvider

The LocalizationProvider for Optimizely has long been a powerful tool for enhancing the localization capabilities of Optimizely CMS. Designed to ma...

Luc Gosso (MVP) | Jan 14, 2025 | Syndicated blog

Order tabs with drag and drop - Blazor

I have started to play around a little with Blazor and the best way to learn is to reimplement some old stuff for CMS12. So I took a look at my old...

Per Nergård | Jan 14, 2025

Product Recommendations - Common Pitfalls

With the added freedom and flexibility that the release of the self-service widgets feature for Product Recommendations provides you as...

Dylan Walker | Jan 14, 2025

My blog is now running using Optimizely CMS!

It's official! You are currently reading this post on my shiny new Optimizely CMS website.  In the past weeks, I have been quite busy crunching eve...

David Drouin-Prince | Jan 12, 2025 | Syndicated blog

Developer meetup - Manchester, 23rd January

Yes, it's that time of year again where tradition dictates that people reflect on the year gone by and brace themselves for the year ahead, and wha...

Paul Gruffydd | Jan 9, 2025