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

Forums / Developing with Sitefinity / Extending Workflow

Extending Workflow

19 posts, 0 answered
  1. Daniel
    Daniel avatar
    10 posts
    Registered:
    08 Apr 2008
    13 May 2008
    Link to this post
    Hi there,

    We are considering extending the workflow in SiteFinity to meet some specific needs of our client.  I notice on another post that integration with WF may be supported in the future, but I would like to get an idea of any recommendations you might have about what we can do in the short term.

    The kind of things we are looking for are:
    - add a new state to the workflow
    - or add a new action to the exiting workflow
    - or add a notification on  state change.

    The kind of ideas we have are:
    - create a new workflow provider overriding the existing provider where necessary.  Sounds hard...
    - create new UI controls to mange the workflow and add in some of our own code.  Sounds hacky...
    - catch a state change event or some other way to hook into when a state change happens.  Sounds simpler...  Can this be done in code?  In the DB?

    Thanks for any advice you have,
    Cheers,
    Daniel Flippance
  2. Daniel
    Daniel avatar
    10 posts
    Registered:
    08 Apr 2008
    16 May 2008
    Link to this post
    Hi there,

    I found this post, which describes how to catch page Create, Update and Delete events:
    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-bddcbk.aspx

    This should meet quite a few of our needs and we are considering creating a report to list pages which are in the Pending Approlval state, so I think that will probably cover what we need to do for this project.

    Thanks for any brain-effort you expended thinking about this.
    Cheers,
    Daniel
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    17 May 2008
    Link to this post
    Hello Daniel,

    A new state could be added with some efforts, but unfortunately we don't have it documented. We are planning to integrate WWF in Sitefinity with the next major release, most probably at the end of this year. We are glad you have found some concepts on catching the page actions. We believe that the KB article How to notify approvers when a News items is send for approval may help you, because it also describes how to handle all workflow eventsSendForApproval, Approve, Decline, Publish.

    I hope the provided information is helpful. Don't hesitate to contact us if you have any other questions.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    19 May 2008
    Link to this post
    Hi Daniel,

    We added an implementation that will allow you to customize the page workflow in the upcoming Sitefinity 3.2 SP2.

    You should do the following steps:
    1. Create a page workflow class to the define the page workflow activities, e.g. CustomPageWorkflow.cs in the ~/App_Code folder:
    using Telerik.Cms; 
    using Telerik.Workflow; 
     
    /// <summary> 
    /// Summary description for CustomPageWorkflow 
    /// </summary> 
    public class CustomPageWorkflow : PageWorkflow 
        protected override void LoadActivities() 
        { 
            // Step 1: wait to send for approval 
            //**************************************************************** 
            ListenActivity listen = Activity.Load<ListenActivity>(base.Transaction); 
            base.AddActivity(listen); 
     
            EventActivity eventActivity = Activity.Load<EventActivity>(base.Transaction); 
            eventActivity.Caption = "Send for approval"
            eventActivity.CommandName = "SendForApproval"
            listen.AddActivity(eventActivity); 
     
            SetApprovalStatusActivity setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction); 
            setStatus.ApprovalStatus = ApprovalStatus.ForApproval; 
            eventActivity.AddActivity(setStatus); 
     
            // Step 2: wait for denial or approval 
            //****************************************************************** 
            listen = Activity.Load<ListenActivity>(base.Transaction); 
            base.AddActivity(listen); 
     
            eventActivity = Activity.Load<EventActivity>(base.Transaction); 
            eventActivity.Caption = "Approve"
            eventActivity.CommandName = "Approve"
            listen.AddActivity(eventActivity); 
     
            setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction); 
            setStatus.ApprovalStatus = ApprovalStatus.Approved; 
            eventActivity.AddActivity(setStatus); 
     
            eventActivity = Activity.Load<EventActivity>(base.Transaction); 
            eventActivity.Caption = "Decline"
            eventActivity.CommandName = "Decline"
            listen.AddActivity(eventActivity); 
     
            setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction); 
            setStatus.ApprovalStatus = ApprovalStatus.Declined; 
            eventActivity.AddActivity(setStatus); 
     
            // Step 3: check condition 
            //********************************************************************* 
     
            IfElseActivity ifElse = Activity.Load<IfElseActivity>(base.Transaction); 
            ifElse.InterfaceType = typeof(CmsWorkflowService); 
            ifElse.MethodName = "IsApproved"
            ifElse.Parameters = new object[] { base.ItemId }; 
            base.AddActivity(ifElse); 
     
            ConditionActivity trueActivity = Activity.Load<ConditionActivity>(base.Transaction); 
            trueActivity.Condition = true
            ifElse.AddActivity(trueActivity); 
     
            ConditionActivity falseActivity = Activity.Load<ConditionActivity>(base.Transaction); 
            falseActivity.Condition = false
            ifElse.AddActivity(falseActivity); 
     
            // Step 4: wait to publish 
            //********************************************************************* 
            listen = Activity.Load<ListenActivity>(base.Transaction); 
            trueActivity.AddActivity(listen); 
     
            eventActivity = Activity.Load<EventActivity>(base.Transaction); 
            eventActivity.Caption = "Publish"
            eventActivity.CommandName = "Publish"
            listen.AddActivity(eventActivity); 
     
            CallExternalMethodActivity callMethod = Activity.Load<CallExternalMethodActivity>(base.Transaction); 
            callMethod.InterfaceType = typeof(CmsWorkflowService); 
            callMethod.MethodName = "PublishPage"
            callMethod.Parameters = new object[] { base.ItemId }; 
            eventActivity.AddActivity(callMethod); 
     
            setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction); 
            setStatus.ApprovalStatus = ApprovalStatus.Published; 
            eventActivity.AddActivity(setStatus); 
        } 
    ... which is the implementation of the default page workflow.

    2. Replace the default workflow with you custom one by adding a pageWorkflowType attribute to the CmsProvider in the web.config:
        <cms defaultProvider="Sitefinity" disabled="false"
          <providers> 
            <clear /> 
            <add connectionStringName="DefaultConnection"  
                 allowPageHistory="true" 
                 allowPageWorkflow="true"  
                 pageWorkflowType="CustomPageWorkflow" 
                 name="Sitefinity"  
                 type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data" /> 
          </providers> 

    The above solution will work after Sitefinity 3.2. SP2 is released.

    Please let us know if you experience any problems with it.

    All the best,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. AdamC
    AdamC avatar
    6 posts
    Registered:
    19 Nov 2007
    02 Jun 2008
    Link to this post
    Hi There

    We are wanting to send emails when certain steps in the workflow are initiated.  We've managed to get this working by creating our own Custom Activity, and then creating our own workflow as noted on this post. 

    We are wondering, how can we get information on the page that the workflow is acting upon?  For instance, the page name?  We would need to do this from within our custom activity or custom workflow

    Thanks
  6. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    04 Jun 2008
    Link to this post
    Hello Adam,

    The CmsProvider has GetPageByWorkflow() method. It seems it is not exposed by CmsManager, so you can use the following code to access it and get the ICmsPage oblect:

    CmsManager manager = new CmsManager(); 
        ICmsPage page = manager.Provider.GetPageByWorkflow(workflowID); 
     

    Also, you could see the following related KB article:
    How to notify approvers when a News items is send for approval

    Please let us know if you experience any problems.

    Sincerely yours,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. AdamC
    AdamC avatar
    6 posts
    Registered:
    19 Nov 2007
    04 Jun 2008
    Link to this post
    Hi Vlad

    Thanks for the info.

    This raises another question though... how do I get the workflowID?


    I tried

    CmsManager manager = new CmsManager();
            ICmsPage page = manager.Provider.GetPageByWorkflow(this.ItemId);

    From within my customWorkflow class, but this does not work, I get an "Object reference not set to an instance of an object" error when I try to use the page object after the above call .  I can't seem to find the workflow ID exposed anywhere.

    Thanks
  8. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    05 Jun 2008
    Link to this post
    Hi Adam,

    Sorry, we thought that you have a workflowID and need to get the page info...

    Are you using the solution described in How to notify approvers when a News items is send for approval KB article to handle the workflow events?
    Could you please send us a your implementation of handling the workflow events? We we will provide the most appropriate way to get the page info.

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. AdamC
    AdamC avatar
    6 posts
    Registered:
    19 Nov 2007
    05 Jun 2008
    Link to this post
    Hi Vlad

    I'm using the solution posted in this thread in the 4th post by creating a custom class in the app_code folder.

    public class CustomPageWorkflow : PageWorkflow

    I want to get the page information within this CustomPageWorkflow class.

    I've not changed anything in the class posted in that post as of yet, but am planning on having a custom activity attached to "Send for approval" that emails some users telling them a page has been sent for approval.  I want to make sure I can tell this which page it is. 

    Thanks

    Adam
  10. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    06 Jun 2008
    Link to this post
    Hi Adam,

    The implementation described in How to notify approvers when a News items is send for approval KB article is a simple implementation, which handles the workflow event on user control level.

    There is another more complicated approach, which handles events on low level, in the PageWorkflow class (
    4th post in this thread). For instance, in that class, when a Publish event happens it calls external method, i.e.:

                eventActivity = Activity.Load<EventActivity>(baseransaction); 
                eventActivity.Caption = Messages.Publish; 
                eventActivity.CommandName = "Publish"
                listen.AddActivity(eventActivity); 
     
    // Calls external method 
                CallExternalMethodActivity callMethod = Activity.Load<CallExternalMethodActivity>(base.Transaction); 
                callMethod.InterfaceType = typeof(CmsWorkflowService); 
                callMethod.MethodName = "PublishPage"
                callMethod.Parameters = new object[] { base.ItemId }; 
                eventActivity.AddActivity(callMethod); 
     
     
    ... the CallExternalMethodActivity class is created and added to the Publish command event activity. The WorkflowId is passed as a parameter with base.ItemId.
    But you don't need to use the complicated and universal CallExternalMethodActivity class. Instead you could just create your own Activity class and implement your custom logic for handling event, e.g.:

    public class CustomActionActivity : Activity 
        public Guid WorkflowID 
        { 
            get 
            { 
                return this.workflowID; 
            } 
            set 
            { 
                this.workflowID = value; 
            } 
        } 
         
        public override ActivityExecutionStatus Execute(WorkflowRuntime runtime) 
        { 
            CmsManager manager = new CmsManager(); 
            ICmsPage page = manager.GetPageByWorkflow(this.WorkflowID); 
     
            // Add your logic for here 
     
     
     
            return base.Execute(runtime); 
        } 
     
        private Guid workflowID; 

    ... and add your custom activity to the SendForApproval event activity.

    EventActivity eventActivity = Activity.Load<EventActivity>(base.Transaction); 
    eventActivity.Caption = Messages.SendForApproval; 
    eventActivity.CommandName = "SendForApproval"
    listen.AddActivity(eventActivity); 
     
    SetApprovalStatusActivity setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction); 
    setStatus.ApprovalStatus = ApprovalStatus.ForApproval; 
    eventActivity.AddActivity(setStatus); 
     
    // Add your custom activity here 
    CustomActionActivity caActivity = Activity.Load<CustomActionActivity>(base.Transaction); 
    caActivity.WorkflowID = base.ItemId; 
    eventActivity.AddActivity(caActivity); 
     

    Hope this is helpful. Please let us know if you have additional questions.

    Sincerely yours,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. AdamC
    AdamC avatar
    6 posts
    Registered:
    19 Nov 2007
    09 Jun 2008
    Link to this post
    Hi Vlad

    Thanks for the info, i'm still not able to get it working.  The code is below.

    On thing is that the CMSManager does not have a call to GetPageByWorkFlowId, but it's member named provider does.

    We don't want to customize the user controls, we want to use the custom workflows.

    Here is our custom class.

    using Telerik.Cms;  
    using Telerik.Workflow;  
    using System.Net.Mail;  
    using System;  
     
    /// <summary>  
    /// Custom Activity that sends emails out.  
    /// </summary>  
    public class EmailActivity : Activity  
    {  
        public EmailActivity() { Status = ApprovalStatus.ForApproval; }  
        public ApprovalStatus Status;  
        private Guid workflowID;  
     
        public Guid WorkflowID  
        {  
            get 
            {  
                return this.workflowID;  
            }  
            set 
            {  
                this.workflowID = value;  
            }  
        }   
     
     
        public override ActivityExecutionStatus Execute(WorkflowRuntime runtime)  
        {  
            CmsManager manager = new CmsManager();   
            ICmsPage page = manager.Provider.GetPageByWorkflow(this.WorkflowID);   
     
            //send an email  
            MailMessage mailMsg = new MailMessage();  
     
            // Subject and Body     
            switch (Status)  
            {  
                case ApprovalStatus.Approved:  
                    mailMsg.Subject = "page approved";  
                    mailMsg.Body = page.Name + " Approved";  
                    break;  
                case ApprovalStatus.Archived:  
                    break;  
                case ApprovalStatus.Declined:  
                    mailMsg.Subject = "page declined";  
                    mailMsg.Body = page.Name + "Declined";  
                    break;  
                case ApprovalStatus.Draft:  
                    break;  
                case ApprovalStatus.ForApproval:  
                    mailMsg.Subject = "page pending approval";  
                    mailMsg.Body = page.Name + " sent for Approval";  
                    break;  
                case ApprovalStatus.None:  
                    break;  
                case ApprovalStatus.Published:  
                    break;  
                default:  
                    break;  
            }  
     
     
     
     
            if (!mailMsg.Subject.Equals(string.Empty))  
            {  
                // To    
                string approversRole = "ContentEditors";  
                string[] usernames = Telerik.Security.UserManager.Default.GetUsersInRole(approversRole);  
                foreach (string username in usernames)  
                {  
                    System.Web.Security.MembershipUser user = Telerik.Security.UserManager.Default.GetUser(username);  
                    mailMsg.To.Add(user.Email);  
                }  
     
                // Init SmtpClient and send     
                SmtpClient smtpClient = new SmtpClient();  
                if (mailMsg.To.Count <= 0)  
                    mailMsg.To.Add(mailMsg.From);  
     
                smtpClient.Send(mailMsg);  
            }  
            return base.Execute(runtime);  
     
     
        }  
    }  
     
    public class CustomActivity: Activity  
    {  
        //empty class to keep sitefinity happy since we had an activity of this name before.    
        // you can't remove an activity class once it has been used, you can only change the implementation.  
    }  
     
     
    /// <summary>   
    /// Summary description for CustomPageWorkflow   
    /// </summary>   
    public class CustomPageWorkflow : PageWorkflow  
    {  
         
     
        protected override void LoadActivities()  
        {  
            // Step 1: wait to send for approval   
            //****************************************************************   
            ListenActivity listen = Activity.Load<ListenActivity>(base.Transaction);  
            base.AddActivity(listen);  
     
            EventActivity eventActivity = Activity.Load<EventActivity>(base.Transaction);  
            eventActivity.Caption = "Send custom approval";  
            eventActivity.CommandName = "SendForApproval";  
            listen.AddActivity(eventActivity);  
     
            SetApprovalStatusActivity setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction);  
            setStatus.ApprovalStatus = ApprovalStatus.ForApproval;  
            eventActivity.AddActivity(setStatus);  
     
            //we want an email to go to the approvers when a page is sent for approval  
            //add the eMail activity to the event          
            EmailActivity emailActivity = Activity.Load<EmailActivity>(base.Transaction);  
            emailActivity.WorkflowID = base.ItemId;  
            emailActivity.Status = ApprovalStatus.ForApproval;  
              
            eventActivity.AddActivity(emailActivity);  
     
              
     
            // Step 2: wait for denial or approval   
            //******************************************************************   
            listen = Activity.Load<ListenActivity>(base.Transaction);  
            base.AddActivity(listen);  
     
            eventActivity = Activity.Load<EventActivity>(base.Transaction);  
            eventActivity.Caption = "Approve (custom)";  
            eventActivity.CommandName = "Approve";  
            listen.AddActivity(eventActivity);  
     
            setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction);  
            setStatus.ApprovalStatus = ApprovalStatus.Approved;  
            eventActivity.AddActivity(setStatus);  
              
            eventActivity = Activity.Load<EventActivity>(base.Transaction);  
            eventActivity.Caption = "Decline (custom)";  
            eventActivity.CommandName = "Decline";  
            listen.AddActivity(eventActivity);  
     
            setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction);  
            setStatus.ApprovalStatus = ApprovalStatus.Declined;  
            eventActivity.AddActivity(setStatus);  
              
     
            // Step 3: check condition   
            //*********************************************************************   
     
            IfElseActivity ifElse = Activity.Load<IfElseActivity>(base.Transaction);  
            ifElse.InterfaceType = typeof(CmsWorkflowService);  
            ifElse.MethodName = "IsApproved";  
            ifElse.Parameters = new object[] { base.ItemId };  
            base.AddActivity(ifElse);  
     
            ConditionActivity trueActivity = Activity.Load<ConditionActivity>(base.Transaction);  
            trueActivity.Condition = true;  
            ifElse.AddActivity(trueActivity);  
     
            ConditionActivity falseActivity = Activity.Load<ConditionActivity>(base.Transaction);  
            falseActivity.Condition = false;  
            ifElse.AddActivity(falseActivity);  
     
            // Step 4: wait to publish   
            //*********************************************************************   
            listen = Activity.Load<ListenActivity>(base.Transaction);  
            trueActivity.AddActivity(listen);  
     
            eventActivity = Activity.Load<EventActivity>(base.Transaction);  
            eventActivity.Caption = "Publish (custom)";  
            eventActivity.CommandName = "Publish";  
            listen.AddActivity(eventActivity);  
     
            CallExternalMethodActivity callMethod = Activity.Load<CallExternalMethodActivity>(base.Transaction);  
            callMethod.InterfaceType = typeof(CmsWorkflowService);  
            callMethod.MethodName = "PublishPage";  
            callMethod.Parameters = new object[] { base.ItemId };  
            eventActivity.AddActivity(callMethod);  
     
            setStatus = Activity.Load<SetApprovalStatusActivity>(base.Transaction);  
            setStatus.ApprovalStatus = ApprovalStatus.Published;  
            eventActivity.AddActivity(setStatus);  
        }  
    }  
     

    Here is the error we are getting.

    Server Error in '/' Application.  
    --------------------------------------------------------------------------------  
     
    Object reference not set to an instance of an object.   
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
     
    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.  
     
    Source Error:   
     
     
    Line 51:             case ApprovalStatus.ForApproval:  
    Line 52:                 mailMsg.Subject = "page pending approval";  
    Line 53:                 mailMsg.Body = page.Name + " sent for Approval";  
    Line 54:                 break;  
    Line 55:             case ApprovalStatus.None:  
       
     
    Source File: c:\Inetpub\wwwroot\SitefinityTest\App_Code\CustomPageWorkflow.cs    Line: 53   
     
    Stack Trace:   
     
     
    [NullReferenceException: Object reference not set to an instance of an object.]  
       EmailActivity.Execute(WorkflowRuntime runtime) in c:\Inetpub\wwwroot\SitefinityTest\App_Code\CustomPageWorkflow.cs:53  
       Telerik.Workflow.Activity.Execute(WorkflowRuntime runtime) +348  
       Telerik.Workflow.EventActivity.Execute(WorkflowRuntime runtime) +64  
       Telerik.Workflow.Activity.ExecuteNext(WorkflowRuntime runtime) +69  
       Telerik.Workflow.Activity.Execute(WorkflowRuntime runtime) +228  
       Telerik.Workflow.SetApprovalStatusActivity.Execute(WorkflowRuntime runtime) +177  
       Telerik.Workflow.Activity.Execute(WorkflowRuntime runtime) +348  
       Telerik.Workflow.EventActivity.Execute(WorkflowRuntime runtime) +64  
       Telerik.Workflow.WebControls.WorkflowMenu.Button_Command(Object sender, CommandEventArgs e) +206  
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +130  
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +38  
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3214  
     
       
     
     
    --------------------------------------------------------------------------------  
    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433  


    Not sure what i'm missing, the error occurs when we send for approval.

    Thanks    
  12. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    13 Jun 2008
    Link to this post
    Hi Adam,

    It seems the WorkflowID is not persisted in the database and when trying to get the ICmsPage object it always returns null. Sorry for omitting this.
    Please change the WorkflowID property of the EmailActivity class as follows:

        public Guid WorkflowID 
        { 
            get 
            { 
                object value = base.GetValue("WorkflowID"); 
                return value != null ? (Guid)value : Guid.Empty; 
            } 
            set 
            { 
                base.SetValue("WorkflowID", value); 
            } 
        } 
     

    Hope this fix will help and sorry for its delay.

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. Armen
    Armen avatar
    11 posts
    Registered:
    07 Feb 2008
    14 Jan 2009
    Link to this post
    Hi,

    I have an other issue that would like to get your help on it. I added my new workflow step as you have mentioned in 4th post and need to have it available only for users with specific permissions. At this moment I am able to assign Approve permission to specific role, but need to have an other permission for Final Approval, so that the user with permission to approve will not be able to set Final Approval. How can I do this?

    And one more issue, can you please give me a hint on how to apply this to modules as well, as it works for pages with provided webconfig settings.

    Thanks,
    Armen
  14. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    15 Jan 2009
    Link to this post
    Hi Armen,

    Currently, adding custom permissions for pages is not supported in Sitefinity. Probably, the option is to have a specific role for this purpose, and check if the current user belongs to this role.

    Unfortunately, your second requested option is not supported too - you cannot change the default workflow for the generic content modules. We have plans to integrate Windows Workflow Foundation (WWF) into Sitefinity in the future, replacing the current implementation. Therefore we still haven't improved it with more features.
    Regarding the Workflow in modules, you can see this KB article:
    http://www.sitefinity.com/support/knowledge-base/kb-article/b1154K-hmb-b1154T-ceb.aspx

    Best wishes,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  15. Anton Mernov
    Anton Mernov avatar
    110 posts
    Registered:
    03 Dec 2008
    10 Feb 2009
    Link to this post
    Hi Armen,

    I have same problem with approved permission. But I don't know how to resolve it. Can you show an example of code class?

    Thanks,
    Anton.
  16. andrew
    andrew avatar
    7 posts
    Registered:
    05 Jun 2008
    05 Nov 2010
    Link to this post
    Would there be an easy way of using the customworkflow to publish the page when approved but set the page to hidden in navigation? Then when the page is published change the visibility to true?
  17. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Nov 2010
    Link to this post
    Hi andrew,

    You can do this in Sitefintiy 3.x easily
    - Implement  a custom workflow
    - On each stage you can set Navigable property of ICmsPage depending on your needs.

    In 4.0 we have scheduling so you can set when the page will be published.

    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
  18. andrew
    andrew avatar
    7 posts
    Registered:
    05 Jun 2008
    05 Nov 2010
    Link to this post
    Thanks for that Ivan, I looked into it and keep on getting this error...

    CS0120: An object reference is required for the non-static field, method, or property 'Telerik.Cms.ICmsPage.Navigable.get'

    I looked at the reference and it does point to the ICmsPage ref, any ideas?
  19. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Nov 2010
    Link to this post
    Hi andrew,


    ICmsPage Interface Properties

    bool Navigable { get; set; } - Determines whether the page should be visible in the navigation.

    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
Register for webinar
19 posts, 0 answered