Apply Content Approval Workflows by Page Type and Block’s Folder Name using a Plugin

In the previous post about Apply Content Approval Workflows by Page Type
. I mentioned that I will develop a plugin to deal with several of the burned code we had in the blog. So today is the day.

d1.png

The plugin is developed using jquery and bootstrap and of course it still have some perks to fix, but I think is a good start. The plugin has three tabs. The first one will allow the editor to define a content approval by any page type defined by code

p1

The second one will allow the editor to define content approvals by folder

p2

And the last one will allow the creation, edition and deletion of content approval definitions

p3

So lets go step by step showing the functionality of the plugin

Create a content approval definition

Pressing the button add new content approval definition will display a modal where the user can set the content approval name, if is user initialized (Goes to step 2 directly instead of one if the user is the one who initialize the creation of a page or block), the user that initialize, the user comment when is initialized and a link button to add a step

p4.png.

When the user press the add step link button it will let the user to set the step name, and two link buttons, the first one to add a reviewer, and the second one to remove the step

p5

When the user press the add reviewer link button it will let the user to set the reviewer role or user name, and the type of reviewer. In addition a link button to delete the current reviewer appears. This allow the editors to add or remove steps and reviewers from the current content approval.

p6

Once everything is set, the content approval definition will be created using EPiServer DDS. If the user wants to edit the content approval definition, pressing the edit link button will show a modal with the saved information

p7

If the user wants to delete a content approval definition, pressing the delete link button will show a confirmation modal to allow the deletion.

p8

Finally, in any of the other two tabs, definitions by page type or definitions by folder, and after refreshing the page, the new definition will be available in the combo box of each page type or folder

p9

After choosing which content approval definition applies to each page type, the user must press the update approval definitions by page type or update approval definitions by folder button respectively which is located at the bottom of the page.

p10

This will display a modal saying that the updated was successful or not

p11

And that is all. Every time the user goes to the CMS editor and create a page with one of the types or folder that has a content approval definition set in the plugin the page or block will have the content approval definition defined and must follow the process to be published

The plugin will be available as a nuget package and the code as a github project soon !!!. I hope it will help someone and as always keep learning !!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s