Right now I've been implementing User Interface 2012 and after some hurdles it works just fine. I've been looking to optimise the usability of any UI-editable fields, and run into a related challenge.
Within a component there are several fields that are not mandatory, and as such should not be displayed when they are empty. As soon as an editor enters UI and selects the component holding said fields, several labels such as <add text> and <add internal link to component media> appear.
I am looking to change these labels to something more descriptive of their content, because additional html will be added to the page when a field is not empty.
For example (using Razor Mediator):
@if(Component.Fields.location != null) {
<span class="row">
<strong>Where:</strong>
<span>@RenderComponentField("location", 0)</span>
</span>
} else {
<tcdl:ComponentField name="location"></tcdl:ComponentField>
}
When the location field is empty, it just says <add text>. I would like to change that to <Add location to event>.
I've tried putting something between the tcdl-tags, but they display even when not editing in UI2012. I've been searching the SDL Live content sites but I cannot find any reference to it. Anyone have an idea?
I was looking for the same when I was checking this, but I don't think that is doable easily AFAIK. I went little bit deep and found that the labels are part of resource file
Tridion.Web.UI.Editors.SiteEdit.Strings.resxEmptyTextField. I did not pursue the option to fiddle with this because it would not be the supported way, nor documented and on top of it I still don't have the flexibility of adding my own text for the each field.Back to your question, I was tossing up an idea (not necessarily answer to your question) and want to share here so the experts could provide some valuable suggestions. I did not try this option (i felt too much work) and this is in my long todo list and might have some drawbacks as well.
Create Schema Fields with "default values" (e.g; "Add location to event"). the default text will be displayed in your UI.
Write Your templates in a way that if the Schema field value is same as default
Also, posting Tridion Idea as enhancement request will be great. I will do it in next few days if none exist already.