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

Forums / General Discussions / News titles

News titles

2 posts, 0 answered
  1. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    05 Oct 2010
    Link to this post
    Hi is there a way to enter the trademark symbol (™) in the title field of a news item?

    Thanks,
    Devin
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Oct 2010
    Link to this post
    Hello Devin,

    It is possible, but you have to override NewsView control and its SetItemMetadata method, because title could be encoded in the backend. Another option is creating a custom metakey and encode it, decode it properly so that the NewsView will accept the correct value

    here is  a sample code

    protected override void SetItemMetadata(Control itemContainer, IContent contentItem)
       {
          base.SetItemMetadata(itemContainer, contentItem);
          var title =   contentItem.GetMetaData("Title").ToString();
          if (title.Contains("trade"))
          {
              var s = "™";
              var cntr =  itemContainer.FindControl("Title") as Literal;
              if (cntr != null)
              {
                  cntr.Text = s;
              }
          }
     
       }

    If you do not want to override the control you can make modifications through its external template by subscribing for repeater_ItemDataBound event and there you can access the title in the same way as I show you above.

    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
2 posts, 0 answered