More in this section

Forums / Developing with Sitefinity / Custom News View

Custom News View

7 posts, 1 answered
  1. Amir
    Amir avatar
    4 posts
    Registered:
    20 May 2011
    20 May 2011
    Link to this post
    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.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    20 May 2011
    Link to this post
    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
  3. Amir
    Amir avatar
    4 posts
    Registered:
    20 May 2011
    20 May 2011
    Link to this post
    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.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    23 May 2011
    Link to this post
    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
    Answered
  5. Amir
    Amir avatar
    4 posts
    Registered:
    20 May 2011
    24 May 2011
    Link to this post
    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.
  6. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    19 Dec 2011
    Link to this post
    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


  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    20 Dec 2011
    Link to this post
    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
7 posts, 1 answered