MVC News widget : News detail and News lists on same page
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
Hi,
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
@model Telerik.Sitefinity.Frontend.Mvc.Models.ContentDetailsViewModel
@Html.Action("Index", "News");
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?