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

Forums / Developing with Sitefinity / How to Add Custom News Property

How to Add Custom News Property

3 posts, 0 answered
  1. Ben
    Ben avatar
    18 posts
    Registered:
    12 May 2008
    18 Sep 2009
    Link to this post
    We're using SiteFinity 3.6, and the FAQ provides these instructions:
    Can I add a custom field, for example subtitle?
    Yes. Open the application web.config and in the <metaFields> collection, add this:
    <add key="News.Subtitle" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
    Then, find this folder ~/YourProject/Sitefinity/Admin/ControlTemplates/News and ControlPanelEdit.ascx and ControlPanelInsert.ascx files.
    In <ItemTemplate> section, add this:
    <asp:Label ID="Label8" AssociatedControlID="Subtitle" Text="Subtitle" runat="server"></asp:Label>
    <asp:TextBox ID="Subtitle" Text="" runat="server"></asp:TextBox>

    Problem is, there's no ControlPanelEdit.ascx control in that folder.  All that's there is a ContentVersionView.aspx page, a ContentVersionView.aspx.resx file, and some ButtonSelector.ascx files.  It looks to me like the documentation might be out of date.

    What are the steps I need to follow to add a custom property to the page that allows News entry/edit, and then to persist that value in the database? 

    We're on a bit of a time crunch here, so can I get this answer fairly quickly?  Thanks!

       Ben Furino
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Sep 2009
    Link to this post
    Hello Ben,

    Please take a look at the following article How to map a view to an external template, in Sitefinity 3.6 or later? The steps of adding custom metafields are the same, just the procedure with the templates is different. You need to map the external templates and modify them. All Generic Content based modules uses embedded templates form Sitefintiy 4.0.

    I hope this helps.

    Sincerely yours,
    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. Simon
    Simon avatar
    14 posts
    Registered:
    26 Jul 2008
    26 Oct 2009
    Link to this post
    Can I suggest that you update all the pages that talk about the old way of doing things. Its really frustrating finding that you've spent ages trying to get something working, only to realise that the help pages you are reading refer to pre 3.6 versions.
Register for webinar
3 posts, 0 answered