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

Forums / Developing with Sitefinity / Newsletter Module

Newsletter Module

8 posts, 0 answered
  1. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    16 Dec 2009
    Link to this post
    Hi,
     In sitefinity 3.7 - Newsletter module - User subscription, Editing user info, listing users - is it possible to stop the process of Datamanger object. which it's fire automatically?

    if it's possible how could i  proceed. give me a steps to follow up.

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Dec 2009
    Link to this post
    Hello v,

     Could you elaborate a bit more about the desired result? It is not clear what you are trying to achieve. The DataManager object does not have process. It has methods.


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    16 Dec 2009
    Link to this post
    http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/newsletter-module.aspx

    Please have look on the above thread.
    statement given by you
    --------------------
    Hello v,

    It gives you the data for the both groups because the user is the same. If the email is the same, then the user is changed in each newsletter group from the screenshot dialog. You can pass the group as a QueryString and get it from there, but if you have two users with the same email address, they will be updated in each group.


    Greetings,
    Ivan Dimitrov
    the Telerik team
    ----------------

    It should not happen in my case -  "but if you have two users with the same email address, they will be updated in each group. "

    ~/Sitefinity/Admin/ControlTemplates/Notifications/SubscribersEditorTemplate.ascx
    I need to block the process back happening on the control in built. how could i proceed. because everything here it's dynamically loading.

    Thanks

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Dec 2009
    Link to this post
    Hello v,

    You need to create a custom class that inherits from Telerik.Notifications.Newsletters.WebControl.SubscriberEditor and override CreateChildControls method. Here, do not call the base. You also have to create a custom ControlPanel for the module and get the subscriber that is being edited

    protected override void CreateChildControls ( )
         {
            ....
              ....
            // add your logic here
              ....
                 ....
           ControlPanel cntrlPnl = ( ControlPanel ) this.Parent;
           this.selectedSubscriberId = cntrlPnl.SelectedSubscriberId;
         }
     
     
       private Guid selectedSubscriberId;


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    17 Dec 2009
    Link to this post
    will you please elaborate more. need some sample can you?

    based on the command i try to get the ID of subscriberId, GroupId on the
    ~/Sitefinity/Admin/ControlTemplates/Notifications/SubscribersEditorTemplate.ascx - Page Load event.

    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Telerik.Notifications.Newsletters.WebControl.Admin;

    public class Newsletter : Telerik.Notifications.Newsletters.WebControl.SubscriberEditor
    {
        public Newsletter()
        {
            //
            // TODO: Add constructor logic here
            //

        }
        protected override void CreateChildControls()
         {
           
           ControlPanel cntrlPnl = ( ControlPanel ) this.Parent;
           this.selectedSubscriberId = cntrlPnl.SelectedSubscriberId;
           this.GroupId = cntrlPnl.SelectedGroupId;
           
         }


        public Guid selectedSubscriberId;
        public Guid GroupId;

    }
    Result display as:
    00000000-0000-0000-0000-000000000000
    00000000-0000-0000-0000-000000000000

    Make it as ASAP.
    Thanks





  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    17 Dec 2009
    Link to this post
    Hello v,

    "You also have to create a custom ControlPanel for the module and get the subscriber that is being edited"

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    17 Dec 2009
    Link to this post
    Hi Ivan Dimitrov,
      I need bit elaborate. i'm not getting xactly. will you give some sample/example.

    "You also have to create a custom ControlPanel for the module and get the subscriber that is being edited" " we have to redirect some aspx page to their  needs to put any ctrl / anything dynamically generate.  how to do.. steps to follow up. give the solution little brief.

    Thanks



  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    17 Dec 2009
    Link to this post
    Hi v,

    There are two options.

    1. Create a new module that inherits from Newsletters module and use CreateControlPanel method to add your custom ControlPanel.

    public class NewsletterModuleCustom : NewsletterModule
        {
            /// <summary>
            /// Gets the name of the module.
            /// </summary>
            public override string Name
            {
                get
                {
                    return NewsletterModuleCustom .ModuleName;
                }
            }
     
            /// <summary>
            /// The module title which will appear in the navigation.
            /// </summary>
            public override string Title
            {
                get
                {
                    return "NewsletterModuleCustom ";
                }
            }
     
            /// <summary>
            /// Short description for the module.
            /// </summary>
            public override string Description
            {
                get
                {
                    return Messages.ModuleDescription;
                }
            }
     
     
            /// <summary>
            /// Creates the ControlPanel object which is rendered on the right side of the screen.
            /// </summary>
            /// <returns>Instance of the ControlPanel object of the module.</returns>
            public override Control CreateControlPanel ( TemplateControl parent )
            {
                return new MyCustomControlPanel ( );
            }
    }

    public class MyCustomControlPanel : Telerik.Notifications.Newsletters.WebControl.Admin.ControlPanel
    {
    }

    2. Get the email from SubscriberEditorTemplate Email textbox and get the user using DataManager class. Hide the default "Save user Info" button with ID ="saveChangesbtn" and add your own button that will persits your logic and . This is the easiest way that you can get ths working withouth some advanced coding.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
8 posts, 0 answered