More in this section

Forums / Developing with Sitefinity / ControlPanelInsert.ascx file in news control in sitefinity

ControlPanelInsert.ascx file in news control in sitefinity

12 posts, 0 answered
  1. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    16 Jul 2010
    Link to this post
    Dear Reader

    I am new in sitefinity and I want to add custom field like designation in news module for this I am unable to find ControlPanelInsert.ascx and ControlPanelEdit.ascx file  in news module where I have to code.Is there any way to find it or any other method to add custom field in news module

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 Jul 2010
    Link to this post
    Hello sweety,

    You could take a look at - How to map a template and inside our UserManual page 219

    All the best,
    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
  3. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    22 Jul 2010
    Link to this post
    Dear Team,

    I am very glad to share my experience with you that I have worked on sitefinity and on .net plateform very first time,I found lots of problem in development time but I really appreciate and thankful to all of you that you guys help me a lot....

    I have another problem and I beleive that you guys will help me...

    I am adding a new field "designation" in news module..for that I follow the following steps ,please guide where am I wrong..

    I have Opened the application web.config and in the <metaFields> collection, I have add this:
    <add key="News.Subtitle" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>

    After that,

    1. Created a new directory in the App_Data directory and name it Configuration
    2. Created a new file in the Configuration directory and name it Telerik.Sitefinity.Configuration.ControlsConfig.xml
    3. I have Set following XML in the file in order to map NewsItemNew view to use external template:
    <?xml version="1.0" encoding="utf-8" ?> 
    <controlsConfig> 
      <viewMap> 
        <!-- Insert a new news item template --> 
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemNew" 
    layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemNew.ascx"
        </viewSettings> 
      </viewMap> 
    </controlsConfig> 

     

    I have aaded NewsItemNew.ascx file in the same above location, I have added this resource file in  sitefinity/Admin/News/App_LocalResources/NewsItemNew.ascx.resx .

    What next I have to do...what code I have to write in these files ...
    The new added field is not added in module, It show a designation label in news detail section ,but no textfield is added in edit mode section.

    Please help me to sort out  this...



       
     
  4. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    22 Jul 2010
    Link to this post
    Dear All

    I think I have done it.....
  5. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    22 Jul 2010
    Link to this post
    No the problem is same...i was wrong please help me....
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Jul 2010
    Link to this post
    Hello sweety,

    After the template is added to ControlsConfig.xml the application has to be restarted. Then you need to use controls that implement one of the following interfaces - ITextCotnrol, ICheckBoxControl or control of type RadDateInput, RadDateTimePicker. The controls that will server your metadata should be added inside ContentMetaFields control that is declared in NewsItemNew and NewsItemEdit template.

    All the best,
    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
  7. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    22 Jul 2010
    Link to this post
    how will use these controls...could you please explain it in detail..with process..
    I am sorry it may be I am not understanding the basic things  ..but please explain me in details...
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Jul 2010
    Link to this post
    Hello sweety,

    In UserManual page 219 there is a sample and steps by step explanation how to create and use custom metakeys.

    Kind regards,
    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
  9. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    22 Jul 2010
    Link to this post
    Thankyou for it...

    I have successfully added the field , i have added the field in both file NewsItemNew.ascx and NewsItemEdit.ascx..and it is working ,in admin panel it shows but in browser it is not displayed..what i have to do for dispalying the value on my page...

    by default these items are displayed , and i have to show here  my custom field also...

    • ( set label and format )
    • ( set label and format )
    • ( set label and format )
    • ( set label )
    • ( set label )
    • ( set label


    Thankyou in advance....
  10. Johnny
    Johnny avatar
    45 posts
    Registered:
    08 Mar 2009
    22 Jul 2010
    Link to this post
    Hi Sweety,

    You need to take the same approach for your public pages as you have done for your admin pages. I believe the pages you need to map and alter are "ListPageMaster.ascx" and "ListPageDetails.ascx".

    Hope this helps
    Johnny
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Jul 2010
    Link to this post
    Hello sweety,

    Map public templates for the control you are going to use - NewsView uses ListPageMaster and ListPageDetails templates. Inside these templates there is a Repeater control with ID="repeater". You need to add a control that has the same ID as the name of your metakey inside the repeater.

    Sincerely yours,
    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
  12. sweety
    sweety avatar
    28 posts
    Registered:
    28 Jun 2010
    22 Jul 2010
    Link to this post
    Thankyou very much...

    I got the things...
Register for webinar
12 posts, 0 answered