1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Customizing workflow in sitefinity 3.7

Customizing workflow in sitefinity 3.7

15 posts, 0 answered
  1. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    01 Jul 2010
    Link to this post
    HI,

    We would like to customize sitefinity workflow for specific pages in the website, we would like to customize it such that when the user clicks on save changes  button the user is not redirected back to the admin page instead the user should get a message indicating that the page has been sent for approval, once the page is in the approval state it should send an email to a specific approver indicating that the page is ready for approval. How can we do this?

    Thanks,
    Annie
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    01 Jul 2010
    Link to this post
    Hi Annie,

    Please take a look at this forum post.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    01 Jul 2010
    Link to this post
    Hi Ivan,

    Thanks for you reply, I actually need to edit the functionality of the save button on the page editor, such that the page is sent for approval but the user is not redirected back to the admin page

    Thanks,
    Annie
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    01 Jul 2010
    Link to this post
    Hello Annie,

    In Global.asax, Application_Start you can subscribe for ContentManager.Executed event . Inside this event check the current command name and if it is publish you can make redirect. You could get direct access to the page from the event CommandArguments

    void CmsManager_Executed(object sender, Telerik.ExecutedEventArgs e)
      {
          if (e.CommandName == "Publish")
          {
              
              // do your logic here
          }
    }

    another option is hacking the EditPage

    Create a custom class that inherits form EditPage class. Find the toolbar from there and LinkButton control. Then subscribe for click event

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Cms.Web;
    using Telerik.Cms.Web.UI;
    using System.Web.UI;
    using System.Web.UI.WebControls;
     
    /// <summary>
    /// Summary description for EditPageCustom
    /// </summary>
    public class EditPageCustom : EditPage
    {
        public EditPageCustom()
        {
            //
            // TODO: Add constructor logic here
            //
        }
     
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
     
            ToolBar toolbar = this.Form.FindControl("toolBar") as ToolBar;
            foreach (Control c in toolbar.Controls)
            {
                var control = (((System.Web.UI.HtmlControls.HtmlGenericControl)toolbar.Controls[0].Controls[1]).Controls[0]);
                LinkButton lb = control as LinkButton;
                lb.Click += new EventHandler(lb_Click);
            }
     
        }
     
        void lb_Click(object sender, EventArgs e)
        {
            //
        }
    }

    replace the default edit page with your custom one inside Sitefinity\Admin\EditPage.aspx

    <%@ Page Inherits="EditPageCustom, App_Code" MasterPageFile="~/Sitefinity/Dummy.master" %>


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    01 Jul 2010
    Link to this post
    Thank you! That worked
  6. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    01 Jul 2010
    Link to this post
    I have another question is it possible to disable workflow for certain pages only

    Thanks,
    Annie
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Jul 2010
    Link to this post
    Hello Annie,

    You could skip the wokrflow steps as described in this forum post. I have provided sample code as well.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    02 Jul 2010
    Link to this post
    Hi Ivan

    Thank you, Is it also possible to disable certain toolbox controls for specific workflow users?

    Thanks,
    Annie
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Jul 2010
    Link to this post
    Hello Annie,

    Please take a look at hack_how_to_hide_controls_from_toolbox_section

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    07 Jul 2010
    Link to this post
    Thank you Ivan, is there also a way I can allow users to edit certain pages without having to login?

    Thanks,
    Annie
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Jul 2010
    Link to this post
    Hello Annie,

    It is possible only through the API Working with Pages Programmatically

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    08 Jul 2010
    Link to this post
    Hi,

    Is there a way I can log out users that are logged in, when they try to access specific areas of the sitefinity backend forcing them to log in again?

    Thanks,
    Annie
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    08 Jul 2010
    Link to this post
    Hello Annie,

    There is ASP.NET method that you can use FormsAuthentication.SignOut Method

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    08 Jul 2010
    Link to this post
    Thanks Ivan, Is there also a way I can remove edit locks on pages using the editpage.aspx page?

    Thanks,
    Annie
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    08 Jul 2010
    Link to this post
    Hi Annie,

    By default only users that belong to administrators role can unlock a page. Sample code that will allow you to unlock a page event if you are not an admin has been provided in this forum post - nlock pages user permissions. possible?

    Changing the behavior of the default button would require to override several base classes on your own and actually does not make sense, because this could clear changes that an editor is making.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
15 posts, 0 answered