Custom News View

Posted by Community Admin on 04-Aug-2018 09:33

Custom News View

All Replies

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

Hi guys

I have recently started working with sitefinity. I have created a custome control to view all news. It is working properly. I have a link on this page that will show the content of the news. I have created that url to show content of news from news item object on server. But the page that shows the content of news is out of my control, I also want to have a custom page for that without changind the URL. I still want the url to remain same. /Dateofnews/titleofnews/ . How can I have my own news viewer controller.

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

Hi Amir,

I am not quite sure that I fully understand this request. Why just don't use 2 news widgets and set one of them in master mode and another in details? It this case the url should not alter.

Best wishes,
Ivan Dimitrov
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 20-May-2011 00:00

OK, let's make it simple, assume I have a page that all the news items are shown, then when user clicks on some links to see the full detail of news, I want to show another page which is actually another controller but with same URL of news.

Posted by Community Admin on 23-May-2011 00:00

Hi Amir,

We use the url to filter the control datasource. So you should use the way that I suggested or create some custom control that filters the page data based on a query string keys. Also, the SiteMap does not allow duplicate urls which means that it is hard to change the entire content on a page.

Regards,
Ivan Dimitrov
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 24-May-2011 00:00

Thanks Ivan as you mentioned, I used a custom control to show the list of news and then when user click on read more it will show the content of the news based on URL of news. Thanks for your help.

Posted by Community Admin on 19-Dec-2011 00:00

Hi Ivan,

I am also creating same custom user control for news listing, but when i put '(Apostrophe) in news title the url is showing wromg.

For Example:

URL: /news/2011/12/19/Lorem ipsum dolor sit amet consectetur's adipiscing 

But the HTML is showng like this.

<a s-adipiscing'="" href="/news/2011/12/19/lorem-ipsum-dolor-sit-amet-consectetur">
                    Lorem ipsum dolor sit amet consectetur's adipiscing</a>


Thanks
Asit


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

Hello Asit Pani,

I wasn't able to replicate the issue with the default news view control. Most probably the issues comes from the way you generate the title, the HTML encoding and the way that you style the page.

Best wishes,
Ivan Dimitrov
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