Sitecore Workbox, display item field for name?

随声附和 提交于 2020-01-02 14:10:09

问题


By default Sitecore workbox displays the item name, I want to display the "Title" field (Custom field). How can I do this?


回答1:


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.

  1. In the root of your Sitecore website, locate the following file:

    \sitecore\shell\Applications\Workbox\Workbox.xml

  2. 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 the Sitecore.Client assembly. You can essentially open Sitecore's class in Reflector and copy everything into your new class.

  3. 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"];



来源:https://stackoverflow.com/questions/14645368/sitecore-workbox-display-item-field-for-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!