Posts

Showing posts from November, 2018

Skip workflow steps for administrators and developers

Image
Sitecore workflows are great for publishers and editors. However, as administrator or developer, we usually have to make changes to published items without triggering a new workflow. These changes are usually technical changes/bug fixes that needs to go live as soon as possible and does not really need to go through all the workflow steps. Create a Publish Command to skip workflow steps To achieve this I created a new workflow command. Publish . This command basically skips the submit and approve steps and goes directly to auto publish. The steps: Create an new Command Publish under the Draft state Set next state to the Approved State Set this command to suppress comments Update the Auto Publish action to include related items Per default the parameter for Auto publish is set to : deep=1&smart=1 I recommend setting it to: deep=1&smart=1&related=1 so related items like images are published with the same action. Setting restrictions(security) to rol

Force workflow commands to be available even if Sitecore Item is not locked (edit mode)

It seems like commands are not available unless the user locks the item. There are some exceptions, if you are an administrator they are always available. When an editor edits an item and you have set AutomaticUnlockOnSaved to true, they would have to lock the item again before they can send it for approval. A similar problem happens to the publishers. If they would want to approve or reject a workflow they would have to lock the item. This might not seem like a big problem, but I received several complaints from editors about this, and asked Sitecore support if this is expected behaviour. Sitecore support told me that this is expected, and they provided me with a possible solution. Create an assembly that contains a copy of ‘Sitecore.Shell.Applications.ContentManager.Panels.WorkflowPanel’ class; Override the ‘Render’ method with your definition (you can use the "ILSpy" tool for this purpose). Built and add the assembly to ‘Bin’ folder; Follow to ‘/sitecore/conte

Send Sitecore workflows notifications to users based on Sitecore roles

Image
In many Sitecore solutions, there are different areas, where different editors and publishers maintains content in their respective areas. Sometimes these areas overlap. In this blog post I will give an example of how to send workflow notifications to the different publishers and editors without being restricted to where in the structure the item is created/edited. Creating a connection to roles and the Sitecore item I created a droplink field on the Sitecore items which use workflows so we can connect this item to the corresponding roles. The droplink is populated based on a data folder with items that has the Roles specified. In this example, I have a Publisher Role and an Editor Role, where access rights to workflow commands and other Sitecore roles has been added. The owner roles (owner publisher and owner editor) will inherit from these roles. the owner roles are primarily used to control which users should get notifications in this example, I also use, the owner set