By default Sitecore workbox displays the item name, I want to display the "Title" field (Custom field). How can I do this?
1 Answers
I had a similar requirement where a client needed the Workbox to display the item's 'path' instead of it's name. The problem was that many of their items shared the same name - making it difficult to distinguish between items.
Unfortunately, this change required us to make a custom implementation of the Sitecore WorkboxForm class. I would normally not recommend modifying Sitecore like this, but for something as important as the Workbox, it may be worth the hassle.
In the root of your Sitecore website, locate the following file:
\sitecore\shell\Applications\Workbox\Workbox.xml
Change the CodeBeside to point to your custom implementation of the WorkboxForm class. The default class is located under the
Sitecore.Shell.Applications.Workbox.WorkboxForm
namespace in theSitecore.Client
assembly. You can essentially open Sitecore's class in Reflector and copy everything into your new class.In the private CreateItem() method, change the following line to use the item's title (I used item.Paths.ContentPath):
webControl["Header"] = item["Your Title"];