Try Now
More in this section

Forums / Developing with Sitefinity / Is it possible to create generic code for "all" content items

Is it possible to create generic code for "all" content items

2 posts, 0 answered
  1. David van Geel
    David van Geel avatar
    59 posts
    19 Aug 2009
    04 Aug 2011
    Link to this post
    I'm looking into starting with SF4.x and started with the blogs about adding a custom module. So far I can follow what it should do and I'm looking forward to the promised advanced topics.

    Another I was trying to do was creating a user control (a content rotator) which uses generic code to display news, events or items from custom modules. This was something I was able to do in SF3.7 but I can not find a working approach for SF4.x. Is this something that should be possible?


  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    23 Aug 2017
    08 Aug 2011
    Link to this post
    Hello David,

    To display content from the built in modules use the fluent API for the corresponding module in your rotator control.
    Here is an example taking news items and adding an image from the images modules to the news item.
    Custom modules can`t currently be accessed with the API. Custom modules add a frontend widget  to display their functionality.
    As a possible solution to get the content of a custom module in a widget is to use the custom module widget to get content from the built in modules.

    Stanislav Velikov
    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