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

Forums / Developing with Sitefinity / ExtendingNews Module to contain a Document

ExtendingNews Module to contain a Document

2 posts, 0 answered
  1. Carsten Koster
    Carsten Koster avatar
    12 posts
    Registered:
    05 Sep 2006
    22 Feb 2014
    Link to this post
    Hey forumsters,
    I have just a quick, hopefully easily answered question.

    How would one go about when wanting to add a custom field to the news module which allows to select a document?

    My first thought was to use a custom control which derives from an assetsfield, configuring it to to write mode and single-document. Andadding that as custom field, with short-text by specifying the complete typestring. That seems to work in so far, as the document selector link is available in the edit news item backend and it allows me to choose or upload a document. The problem being it does not save the choose document to the underlying custom field. So when opening the News-Item again, after publishing, the custom field is still  empty. When inspecting the generated PUT-Request the custom field contains an empty string.
    Is it possible to use the asset field in write-mode to fill a custom field  on the news (or event) module, or do I have to build my widget with designer and everything?

    Thank you for your support!!
    Regards,
    Kris

  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    09 Dec 2016
    26 Feb 2014
    Link to this post
    Hi,

    The AssetsField works only for modules created with the Module Builder and this might be the reason why you experience issues with it. You can take a look at the following documentation article which is for creating an image selector for content items. You can use the sample there as a base which you can further modify and improve in order to achieve the functionality you desire.

    Regards,
    Sabrie Nedzhip
    Telerik
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered