1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / SingleNews ajax mode in V36 with NewsView

SingleNews ajax mode in V36 with NewsView

4 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    30 Mar 2009
    Link to this post
    Hi,

    Exist some way to make like oldest version and use one template for one SingleNews in compiled solution with no designer?.

    I have made some tests with no solution. Reading some post I have used the NewsView class to implement one UC and selecting the ContentID. My problem is that I need to modify the standards events of Title and The links to go to my ajax events (not to the news) using some onclick event and passing some querystring and open in one div the SingleNews.
    Could modify the standards events of NewsView class?, some overriding or creating others.
    How to define programatically the items to see without use the standard designer. Some finding method during prerender?. I use one singlediv to put the singleNews selected passing the NewsView by add.Control(mynews).

    I have another problem. When I add in my page 2 or + NewsView list as UC  (with only one ContentID by UC), When I push over the first , both are opened!.

    The object that I searching is adding news one by one in one template, every news have custom css and some ajax event action. 

    Could you sugest the way ?. Many thanks. Romi
  2. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    02 Apr 2009
    Link to this post
    Hi Pierre,

    I am sorry, but I am not sure if I understand correctly your question.

    1. SingleNews is obsolete and is not compiled in Telerik.New.dll anymore. Therefore, you cannot add it manually in the toolbox through web.config.

    2. What exactly are you trying to achieve with the NewsView? What kind of customization do you want to make?

    3. When editing a news view control, switch to Advanced tab, expand QueryString Keys, set TagItemKey , CategoryKey and ContentItemKey are different for all NewsView controls on that page.

    All the best,
    Dido
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    02 Apr 2009
    Link to this post

    Hi Dido,

    I try to use NewsView to create one new logical. The News are opened in one div in same page using ajax with no postback. When I push over Title or others hyperlinks i lauch one Ajax event to open the single news in one div. passing the contentid as querystring. The List of News and the News can be in same page.

    To make this i have many steps that are complex for me.
    a/Selecting one single news Id to use with NewsView. Some post suggest use CategoryID or Title but is no very logical. 
        -Best way to select one single news ?
        -Could add many instances of same news in one page : NO!, when you add 2 the sames single news and click, both are opened.
    b/Using these news Id expose the full content of items to create new logical.
    c/ Expose these content to the template using the new logical. Title is no more hyperlink with postback and NavigateUrl but is Ajax script enable. I need to modify the properties or adding news properties to class NewsView.
    d/ Expose the new properties to template to merge the page with the new content like <%Eval:MyTitle%>.
    Now when you push over title one div is opened with the singlenews.
     
    Regards

  4. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    03 Apr 2009
    Link to this post
    Hello Pierre,

    I wanted to note that Ajax does use postback. The difference is that the user does not notice the reload, as things are done asynchronously (with more than one thread), and via services and javascript.

    Can't you simply add a RadAjaxManager to the NewsView template? When you configure it, you will have effectively AJAX-ified it in less than 5 minutes. You could use iframe-s, as well.

    You can have as many instances as you want to, and they will display different news items. I will repeat what I told you in the previous post. NewsView has the following properties that make this work: ContentItemKeyPersistance (set this to QueryString), TagItemKey , CategoryKey and ContentItemKey (set the last three to something unique).

    Best wishes,
    Dido
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered