Subject Line Field for Email Linnk
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....
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"
/>
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());