Can we change the order of the activity buttons at the top of CMSB interface (like on a record editing page)?
2 posts by 2 authors in: Forums > CMS Builder
Last Post: 15 minutes ago (RSS)
By Codee - about an hour ago
My customer's buttons at the top of a record editor page is erase > save and copy >preview > cancel > save (see screenshot attached). I know it's a "small" issue but it changed order after updating his cmsb versio from 3.77 to 3.84. He's kind of an older guy (78 yrs) and sometimes small changes can upset him a bit - but he's a fabulous guy so if I can easily rearrange the order for him (and keep it from future changes?) it would be a good thing to do for him.
Thank you in advance!
By Dave - 15 minutes ago - edited: 14 minutes ago
Hi Codee,
Happy to help with this one. In v3.83 we standardized the button order across all the admin pages: destructive actions (like Erase) on the far left, and the primary action (Save) always on the far right with Cancel beside it. That follows the convention Mac, iOS, and Android all use, but I can see how a change like that would throw off someone who's had years of muscle memory with the old layout.
I've attached a plugin that restores the buttons to their previous order (Cancel, Erase, Preview, Save). Just upload it to your cmsb/plugins/ folder and activate it under Admin → Plugins.
If your customer wants a different arrangement, there's a single line at the top of the plugin you can edit:
// Buttons appear left to right in the order below - rearrange as desired
// '*' is where buttons added by other plugins appear, e.g. "Save & Copy".
$buttonOrder = ['cancel', 'Erase', 'preview', '*', '_action=save'];
Rearrange those as desired. The '*' is where buttons added by other plugins (like Save & Copy) appear.
And good news on the "keep it from future changes" part: the plugin re-sorts whatever buttons the CMS generates, so the order will stick through future updates.
Let me know if that works for him!
Dave
interactivetools.com