More in this section
Forums / Developing with Sitefinity / Problem Adding Custom Metadata during News Content Creation

Problem Adding Custom Metadata during News Content Creation

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Peter
    Peter avatar
    2 posts
    06 Jun 2011
    19 Dec 2011
    Link to this post

    I need help with a problem.

    On the page where new news items are getting created (Sitefinity_Admin_ControlTemplates_News_NewsItemNew) I have a title field, the text area for adding content, and then the rest is wrapped in:
    <sf:ContentMetaFields ID="MetaFields" runat="server">

    I cant wrap the entire page in the ContentMetaFields tag because I want to avoid dumping the actual article text content into a metafield.

    The problem is that the "Title" field is "above" the content area. So, how do I set the Title metafield along with all the others when the form submits? It has been referenced in the config file.

    I hope I have explained myself well. This is deadline work so, any fast suggestions would be much appreciated! Thanks.      

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    22 Dec 2011
    Link to this post

    By default the Title field is set automatically by the control responsible for managing this. Since the textbox for setting it is not the ItemTemplate of the ContentMetaFields control we explicitly look for this control when the form is posted and set the respective field. What you can do in a similar scenario is to add a OnClick event to the save button. Then when the button is pressed you can take the value of a similar field and pass it to a hidden field with the ID of the metafield located in the ItemTemplate of the ContentMetaFields control.

    All the best,
    Radoslav Georgiev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered