Multiple News Widgets on the same template

Posted by Community Admin on 04-Aug-2018 17:31

Multiple News Widgets on the same template

All Replies

Posted by Community Admin on 20-Jun-2011 00:00

Hi Folks,

I've created a news/view template for use in the "Single Item" view. I have 2 news widgets on this page: One of the left that I want to display a listing of all news articles and the one on the right that is supposed to show the single entry. I'm having an issue where both widgets are rendering the full article instead of just the one on the right. Is there a way to make my left, list-view News widget "non-dynamic"?

Posted by Community Admin on 20-Jun-2011 00:00

Hi Jon,

Thank you for posting this here, it's a really interesting and useful topic. Setting this up is very easy for the desired scenario, you just need to set form the News widget's advanced properties the ContentViewDisplayMode property - on the master news widget change this from "Automatic"
 to "Master", and on the details widget change the property to "Details". I'm attaching a short video demonstrating how to set this functionality, please refer to it for more detailed information. If you have any additional questions, please let us know.

Greetings,
Boyan Barnev
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

Posted by Community Admin on 27-Jul-2011 00:00

Boyan,

Thanks. We got our news page to successfully show a list of news on the left with the Master setting, and the single News item on the right with the Detail setting.

However, when we click a news article in our Master list of news articles, it successfully shows that single (detail) article on the right, but filters our Master list by the same date of the article clicked. I noticed in your video, the articles posted all had the same publish date.

Is there a setting we're missing?

Screenshot of the News page:
cl.ly/1Y42371C201R3X3K1R2m

Screenshot of the News page after clicking an article on the left. Notice the list is filtered by the date of the single article clicked.
cl.ly/3A0n070D2g3a0i0J3u3V

Posted by Community Admin on 29-Jul-2011 00:00

Hi Kurt,

Please take a look at this forum thread, which discusses a similar scenario and contains detailed information on the necessary settings to achieve the desired functionality.

All the best,
Boyan Barnev
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

Posted by Community Admin on 25-Oct-2011 00:00

Hi Boyan,
Can I tell news widget to show details of news item (by setting ContentViewDisplayMode to Detail) and besides that to show any selected or latest news item in case no url gets evaluated as any existing news item?

Posted by Community Admin on 25-Oct-2011 00:00

Hi Saad,

Yes, there's no problem to do this, you can still configure the widget that is responsible for the Detail presentation to display one news item when no URL querystring parameter has been passed from the Master, and it will be displayed in details mode by default.

Regards,
Boyan Barnev
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

Posted by Community Admin on 26-Oct-2011 00:00

Hi Boyan,

I have two pages, Home and NewsDetail.
I have placed News widget on both pages and set ContentViewDisplayMode to Master on Home page. And set ContentViewDisplayMode to Detail on NewsDetail page. It works all fine when I click any news item on Home page. But when I open NewsDetail page without any URL querystring, it shows nothing.

Can you please tell me the steps?

Posted by Community Admin on 31-Oct-2011 00:00

Anyone?

Posted by Community Admin on 31-Oct-2011 00:00

Hi Saad,

Actually, judging by the information you have provided, it seems like you wouldn't need to set the ContentViewDisplayMode at all. Can you please confirm that what you have as a setup is one page ("Home") with one news widget on it displaying a section of news, and another page ("NewsDetail") which also has one news widget, which should display a selection of news if now querystring parameter is included int he URL or a single news item in details mode, if a news item from "Home" is clicked? If that's correct, than this falls in the default behavior of the news widget - it has its ContentViewDisplayMode property set to automatic by default, and if a request from another news widget is made to a page which contains a news widget, it will automatically switch to Details, otherwise it will be in master and display a selection of news. Setting ContentViewDisplayMode is useful when you have two ContentView widgets (e.g. News) on the same page, as this would allow you to control how they react to passing querystring parameters in the URL of the same page.
Please do not hesitate to let me know if the functionality that you're trying to achieve differs from what I've described above.

Regards,
Boyan Barnev
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

Posted by Community Admin on 02-Nov-2011 00:00

Well, I have two pages (Home and NewsDetails) and both has news widgets.

Home page:
Widget on Home should display "all" news no matter what. I can do this by setting it to Master, right?

NewsDetails page:
And widget on NewsDetails should display details of item based on querystring passed to it from Home page, "or" if no querystring is passed (NewsDetails is accessed from anywhere else) which surely wont have querystring, so in this case any selected/default news items details should be shown.

Posted by Community Admin on 02-Nov-2011 00:00

Hello Saad,

Lilke I said, this functionality is covered out of the box if you set the following scenarios:
On your Home page news widget specify the single item to be opened in an existing page, and specify this to be NewsDetails. Please find attached a short video demonstrating this attache dot this reply.
Regards,

Boyan Barnev
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

Posted by Community Admin on 12-Apr-2013 00:00

Hi, I tried putting 'Master' on the 'ContentView' of a forum control. But when I go into a thread of a forum, my 2nd forum control that is supposed to show only a list shows the thread also. How can I keep the 2nd forum control to only show a list and ignore what you do on a forum?

Posted by Community Admin on 17-Apr-2013 00:00

Hello Jon,

You can go to the widget which you want to remain in list mode, and set its UrlKeyPrefix  property to some value (please be careful as this value will be appended in the URL when clicking items from this widget). This way the widget will stay in list mode until this prefix is not included in the URL. You can find more information about the different settings that determine this behavior on this blog post.

All the best,
Boyan Barnev
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

This thread is closed