5

After switching from Sitecore 8 to Sitecore 9, the workbox has another behaviour compare to previous version.

If you open an item in workbox the view for "content tree" is always disabled. Even if you click that checkox and open another workbox item the tree is closed again

does some one has a solution to always enable content tree for workbox items

3

It is expected Sitecore 9 behavior. Content tree checkbox is unchecked when either you uncheck it in Content Editor and it was saved in user options, or Content Editor is opened in popup mode.(It is actually happen when you open it from Workbox).

What could be done:

You can override command that respond for check/uncheck statues of this checkbox, it is configured in Commands.config:

<command name="contenteditor:toggleentiretree" type="Sitecore.Shell.Framework.Commands.ContentEditor.ToggleEntireTree,Sitecore.Kernel"/>

and you can override QueryState function:

public override CommandState QueryState(CommandContext context)
{
    if (!UserOptions.View.ShowTree)
    {
        return CommandState.Enabled;
    }
    return CommandState.Down;
}

(there was removed condition: !(WebUtil.GetQueryString("mo") != "popup"))

Then state of this checkbox will depend only from user options and not from window mode. Like it was in earlier Sitecore versions.

  • thanks for your reply. but that does not seem to work. "contenteditor:toggleentiretree" seems to be the wrong part. I think contenteditor:togglefolders is the correct one. but also when I always return commandState.Down or commandState.Enabled the content tree does not show up es default (is always hidden, when &mo=popup is given via GET param) – Mkress May 31 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.