Try Now
More in this section

Forums / Project Feather / MVC News widget : News detail and News lists on same page

MVC News widget : News detail and News lists on same page

3 posts, 0 answered
  1. Snehal
    Snehal avatar
    2 posts
    13 Jan 2016
    03 May
    Link to this post

    Hi all,

    I have created one page for News Details where I have added News widget at 2 placeholders for showing News Detail and News List. When I select any news from home page then it is redirecting to News detail page. On News detail page both the sections News Detail and News list are showing selected news only.

    Please help me on this

  2. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    24 Oct 2016
    03 May
    Link to this post

    With webforms this is possible by placing two widgets on the page and changing the ContentViewDisplayMode property in advanced widget settings.
    Automatic is the Default but if you change it to Master it will show the list.   

    However Feather widgets don not have this property.
    As a workaround you can create two new views for the Feather news widget which will be used for showing the News list of the second widget on the details page.

    Within ~/MVC/Views/News you create 2 new files, for example: List.NewsListCustom.cshtml and paste:

    @model Telerik.Sitefinity.Frontend.Mvc.Models.ContentListViewModel

    and Detail.DetailPageCustom.cshtml and paste:

    @model Telerik.Sitefinity.Frontend.Mvc.Models.ContentDetailsViewModel
    @Html.Action("Index", "News");

    Now on your detail page you use the 2 custom views for the "News List" widget.

    Please observe following screencast with a small demo:

    There is a Feature Request logged regarding the "Add ContentViewDisplayMode for Feather content widgets", available here:

    Dimitri Cools
    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
  3. martin
    martin avatar
    36 posts
    30 Nov 2008
    21 Sep in reply to Dimitri Cools
    Link to this post

    This workaround is fine when you have only one View for the news listing. How can you do it when you have several list views and you want to display a specific one?

    This command @Html.Action("Index", "News") is calling the default view for News List, is there a way to specify a different view file?

3 posts, 0 answered