Exposing Page Metadata in Experience Editor

Experience Editor is, ultimately, the way that editors should interact with content in pages. I mean, as a developer, I quite like Content Editor for seeing my Sitecore content…

… but editors would typically prefer something a bit more visual, something a bit more WYSIWYG. That’s a large part of the value that Sitecore give – inline editing. It’s the point of a lot of content management systems.

That’s fine, and I’ve always found the Experience Editor fairly impressive in this regard – but what do you do about content that’s not visible in the page?

A good example is page metadata – so, canonical URLs, metadata tags, browser titles (for the browser tab), etc.. You might also have a ‘summary’ or ‘thumbnail’ to use in some form of content aggregation.

Well, in the SharePoint systems I used to work with, we’d use Edit Panels in the page – that is, areas of the page that would only be shown to editors, and that would let them set these bits of text. It worked pretty well, but it was a little… awkward.

How about if we presented a dialog instead?

Continue reading “Exposing Page Metadata in Experience Editor”

Advertisements
Exposing Page Metadata in Experience Editor

Adding a button to the User Manager

A quick shout out to this page – Adding Options to Sitecore Applications by Alistair Deneys . It’s a nice guide about how to do exactly that – add options to the menus in Sitecore. It was pretty straight forward to do for the User Manager:

  • Add an entry in the Core database to represent the button
  • Add a patch file that defines your command and what class it should call
  • Add a class file that defines the command in a child of Sitecore.Shell.Framework.Commands.Command . Override and implement Execute

The parameters to the Execute method contains which usernames have been selected. This is as a pipe separated list:

public override void Execute(CommandContext context)
{
string usernamesParameter = context.Parameters["username"];
string[] usernames = null;
if (!string.IsNullOrEmpty(usernamesParameter))
{
char[] splitter = {'|' };
usernames = usernamesParameter.Split(splitter, StringSplitOptions.RemoveEmptyEntries);
}

That might help.

Adding a button to the User Manager

Hiding a Tab Group from a custom list type in SharePoint 2010's Ribbon

I have a custom list definition that I’ve been writing. The ribbon on it looks something like this:

Unfortunately, I don’t want some of the groups shown on this tab. For example, I don’t want any of the ‘Connect & Export’ group, or ‘Customize List’ – these things could actually break my solution. So, how to hide?

Initially, I looked at the HideCustomAction Feature element. This what you’d use for hiding links to settings pages, etc., and it seems a natural choice. Unfortunately, it doesn’t allow a RegistrationId in the same way that a CustomAction element does – so there was no way to restrict this to my list only. Damn.

Continue reading “Hiding a Tab Group from a custom list type in SharePoint 2010's Ribbon”

Hiding a Tab Group from a custom list type in SharePoint 2010's Ribbon

Tokenisation and the Ribbon

A useful post on the MS SharePoint developer blog – “Tokenization in the SharePoint 2010 Server Ribbon“. I always find it a little tricky remembering what token works in which place; this explains it.

In general, and as a reference for myself:

Location ListUrlDir ItemId ItemUrl RecurrenceId SiteUrl ListId Source SelectedListId SelectedItemId
List View Yes No No No Yes Yes Yes Yes Yes
List Form Yes Yes Yes Yes Yes Yes Yes No No
Tokenisation and the Ribbon

Outlook Plugin – Finding the ImageMSO for the ribbon

Ages ago, I wrote an Outlook plugin for saving emails (.msg files) from Outlook 2003 to SharePoint 2007. Well, the time had come to upgrade that to Outlook 2010. Broadly speaking, that went well, with one exception – what icon to show in the ribbon?

I didn’t want to go through the pain of designing my own icon (in its various different sizes), so I decided to highjack one of the office ones. The customer I was dealing with wanted the ‘Filing cabinet’ icon of the ‘Auto Archive Settings’ button.

AutoArchive settings on the ribbon

Fine, no problem, it’s built in – in it’s various sizes and resolutions. Except – what is its ID? Continue reading “Outlook Plugin – Finding the ImageMSO for the ribbon”

Outlook Plugin – Finding the ImageMSO for the ribbon

Icons for SharePoint 2010's ribbon

Came across something interesting today – I went looking for an icon in SharePoint 2010’s ribbon, and came to a file called formatmap32x32.png. Interestingly, it contains:

So, it actually holds lots of icons, but the image is cropped using CSS at display time to only show one of those icons. Nice to be able to see a bunch of the icons in one place easily.

(Though not all buttons come from this file – other icons are ‘stand alone’)

Icons for SharePoint 2010's ribbon