Sitecore Field Editors are a useful way to focus content authors on a set of related fields. You might have fields that do not appear anywhere on the page (last year I wrote a blog post on how to use Field Editors to edit meta-data). Or you might have a group of related fields that you want a content author to be able to edit at the same time (instead of having to edit field individually).
Field Editors work by displaying fields on the rendering's content item (which is either the context item or the rendering's data source).
But what you if you want to apply the same capability to rendering properties? This post explains how you can do it.
To my surprise, this isn't something that Sitecore supports out-of-the-box. All of the pieces are there, but they needed to be pulled together. Those pieces have been pulled together in the Extensions for Sitecore Client project, which you can get using NuGet.
After you install the module you can add custom experience buttons for your renderings. Here's a walk-through an example.
Field Editors are useful when you want to limit the fields that are displayed to a content author. So in order to have a meaningful example, I need to have a rendering with multiple fields that I might want to control in this way.
In order for the custom rendering parameters to be available on a rendering, the custom rendering parameters must be assigned to the rendering.
When a rendering is selected in Page Editor, a toolbar appears. On this toolbar are the experience buttons that are assigned to the rendering. I need to create my custom experience buttons.
Next the custom experience buttons must be assigned to the rendering.
Now when I select Sample Rendering in Page Editor I see two additional experience buttons. As always, to see all of the rendering's properties, the Edit the Component Properties button is used.
But now the gold button can be used to display the Basic Settings properties...
...and the silver button can be used to display the Advanced Settings properties.
The WebEdit Button items in the core database are used to specify which rendering properties should be displayed. In the example above I used section names to identify the properties to display. But other options are supported as well.
webedit:ext:renderingfieldeditor(sections=Basic Settings|Advanced Settings)
webedit:ext:renderingfieldeditor(sections=Basic Settings|Advanced Settings,fields=Additional Parameters|Placeholder)
Thanks for the useful article. In Sitecore 8.1, I get an error in the console (using Chrome): "Uncaught SyntaxError: missing ) after argument list" Is this still valid in Sitecore 8.1?
Andreas Karlsen, did you get any further with this as I am getting the same error?
Andreas Karlsen & Alun Jones, did you find a solution for this error? I'm having the exact same problem
It works great on Sitecore 8.2 :-)
Andreas Karlsen Alun Jones David Montero Have you guys installed nuget package - Extensions for Sitecore Client project. Mentioned in the beginning of the post. You need it otherwise it will not work
I noticed a bug in NuGet version 1.0.6 related to fields with raw values of IDs not being saved correctly all the time. I created a pull request for and detailed here: github.com/.../1.