Sitecore Enhancing Content Author Experience - Part 3 (Content)

Enhancing Content Author Experience - Content level

This is the third and final post as part of Sitecore Enhancing Content Author Experience series.

  1. Template
  2. Layout
  3. Content

In last two posts, we had explored from both template & layout level, in this post, let’s explore at Content level.

1. Sitecore Web Controls

Sitecore provides two editors for managing the content, i.e. Content Editor & Experience Editor. Now a days almost all Content Authors are using Experience editor to manage their content. To support their activities in Experience Editor, as a developer we need to take care of few things.

If we render any field content with normal HTML/.NET controls, Content authors will not have any provision to manage them using experience editor. That’s the reason, we always need to render fields content using Sitecore web controls, in this way content author can manage them from experience editor as well.

Some of the examples:

Single Line Text:

1
2
3
<sc:Text runat="server" ID="Title" Field="Name" />
or
@Html.Sitecore().Field("Name")

Image:

1
2
3
<sc:Image runat="server" ID="ListingImage" Field="Listing Image" />
or
@Html.Sitecore().Field("Listing Image")

General Link:

1
2
3
<sc:Link runat="server" ID="CTA" Field="CTA" />
or
@Html.Sitecore().Field("CTA")

2. Custom Experience Editor Button

Sitecore does not support in-line editing for Checkbox, Multilist, TreeList, and other fields. There are no specific Sitecore controls to support these field types. By utilizing Custom Experience Editor buttons, we can provide editing option in experience editor for these fields. In this post let’s explore, how do we achieve it with Field Editor button.

Field Editor Button:
We can find all experience editor buttons in core database, under /sitecore/Content/Applications/WebEdit item.
Following are the steps, to configure a field editor button,
Step 1: Switch to the Core database, navigate to /sitecore/Content/Applications/WebEdit/Custom Experience Buttons items in content editor.
Step 2: Create a new button item, using /sitecore/templates/System/WebEdit/Field Editor Button template.
Step 3: Fill out all four fields, Header, Icon, Fields, Tooltip. Fields is the important one here, as we need to add the field title name. (In our case Country is the field which is of Multilist field type)

Step 4: Switch to master database, and navigate to the component (sub-layout/rendering), and map the newly created button using Experience Editor Buttons field.

Step 5: Now go to experience editor, and edit the component, we can see new Edit button, using which we can edit Country Multilist field.

We can use, Edit frames to achieve the same.

In Summary, being a developer, sometimes we often overlook the importance of Content Authors experience to manage their content. It is very important to imagine ourselves as Content Author position, and think how difficult they feel while managing the content.
Even after knowing all the topics, we tend to miss few of the things, because of the tight deadlines, or for some other reasons. But it is better to have a check list, and do a self-review on these points, before moving any component development to next environment.

Thank you, and that’s all for now.

Happy Learning :)

Share