Working on some custom fields(come back on those in later posts) and found out some crazy stuff:
First of all, there’s an excellent article about creating your own fields on SDN: Creating Custom Field. As a matter of fact, going to provide the documentation team some additional information, but as it is now, it’s also excellent. And it works for 5.1, 5.2 Ã¡nd 5.3!
Second. Did you guys know, it a bunch of work to configure a Contextual Ribbon? Actually didn’t make it at all. What I did found out is that the new Content Editor definitelly has some hardcoded stuff. For example, the Template-Contextual Ribbon. It doesn’t reffer back to another item where it should apply to? Or did I miss one?”
How I came to this conclusion, let me explain:
Looking at the Core database, you’ll find a node called /sitecore/system/ribbons/ribbons/. It contains 1 child: Default. That’s the default menu. The default menu has 9 default tabs/strips(Home, Navigate…….Security, View). Those items are created under the Home-tab. Changing the order of these items, does immediatelly(!) change the order of the tabs/strips in the Editor. Try it yourself!
Those tabs/strips are configured in /sitecore/systems/ribbons/strips/. For example, the Configure contains children with the names ‘Appearence’, ‘Masters’, ‘Template’, ‘Attributes’. Changing order does immediately affect again :). But anyway, you call these groups ‘Chunks’. Chunk are editable in….. /sitecore/systems/ribbons/chunks/. The contain the actions who trigger events, which are followup by the Content Editor. Again changing order affect immediatelly. There are several actions definable:
- Panel -> Allows you to load a Control on the place of a ribbon by defining the type => class and assembly(Take a look at ‘/Chuncks/New/New’)
- Small Button -> Allows you to place a small button with a small icon and some text to the right of the icon
- Large Button -> Allows you to place a large button with a large icon and some text below the icon.
- Large Gallery Button -> Look ‘n Feel like Large Button but after clicking no action happends, but a menu or edit screen appears.
- Small Combo Button -> Look ‘n Feel like Small Button but after clicking a menu appears
Just a second back to the chunk. You can setup a click-event(like here on sorting: ).
Looking at the tree, we only missed the ‘Menus’ and ‘Contextuel Ribbons’ in the story above. About the menu’s, I do no have to explain that much: Small Combo Buttons reffers to an item in the Menus folder and show the children of it.
Last thing to discuss should be the Contextual Tabs. I definitelly want to, but don’t have the time to figure exactly out how they work. They don’t behave like I expected. But that might be funny as well.
For now: have a nice sleep or monday morning cup of coffee :). Cheers!
Note for Jakob: Check in those items! 90% of the core database is checked out to ‘sitecore\Admin’… 😛 And, when you read this: shouldn’t the Small Combo Button be renamed to Small Gallery Button or the Large Gallery Button to Large Combo Button?