Subject Line Field for Email Linnk

Posted by Community Admin on 05-Aug-2018 17:12

Subject Line Field for Email Linnk

All Replies

Posted by Community Admin on 08-May-2014 00:00

Maybe this has been thrown out there already but I just got a request from a client for a subject line for the email link.  I think it would be a great idea possibly under more options, to have subject line and a text box.  Some users are so afraid of HTML that they would never go there and paste in the 
?subject=xxxx  for the email address link.

eh, i can't change my misspelling of Link (Linnk) in the title!! Apologies....

Posted by Community Admin on 13-May-2014 00:00

Hello Laura,

This is a bit trickier customization as it requires overriding the HtmlField's LinkManagerDialog. I have prepared a sample custom dialog attached to this reply, so you can use it on your end. Extract the files into the root of your project, build and then test it. 

Basically we are inheriting from the LinkManagerDialog and using the following approach:

http://www.sitefinity.com/blogs/pavel-benov-s-blog/2013/12/11/extending-client-component-of-field-controls-in-sitefinity-cms

we are registering a custom template to define the additional control for the Subject field:

<sfFields:TextField ID="subjectField" runat="server" DisplayMode="Write" Title="Subject" Example="Subject" WrapperTag="div" CssClass="sfTxtFieldCtrl" />

and a custom script in order to operate with the input of the field. We are getting the value of the Subject field and adding it to the href attribute of the anchor tag that gets generated.

In order for Sitefinity to use the custom dialog we are replacing the built in one from the Global.asax like so:

protected void Application_Start(object sender, EventArgs e)
        
            Bootstrapper.Initialized += Bootstrapper_Initialized;
        
 
        void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
        
            if (e.CommandName == "Bootstrapped")
            
                ObjectFactory.Container.RegisterType(
                    typeof(DialogBase),
                    typeof(CustomLinkManDialog),
                    typeof(LinkManagerDialog).Name,
                    new HttpRequestLifetimeManager());
            
        

Regards,
Pavel Benov
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed