Show Fieldname in Experience Editor Placeholder Text

A few weeks ago on Sitecore Slack chat, fellow MVP Neil Shack discovered a tucked away setting in the renderField pipeline. Enabling this causes the field name to be rendered in the default placeholder text in Experience Editor mode:

It seems that this is an old feature from back in the XSLT days, but it seems to have been forgotten over time…

The show-title-when-blank attribute can be used to display the field name before the inline editing control in the Page Editor if the field is empty, which can help content authors locate empty fields.

Good news is we can still enable it! Patch in the code below.

Now when the GetDefaultText method is called in Sitecore.Pipelines.RenderField.RenderWebEditing it will prefix the placeholder text with the Display Name of the field (or fallback to the Field Name). This makes it much easier for the editors to see what fields are present and what they are about to edit.

That’s it! Great find Neil!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s