More in this section

Forums / Developing with Sitefinity / Customisation of news page layout

Customisation of news page layout

11 posts, 0 answered
  1. Gpl
    Gpl avatar
    7 posts
    Registered:
    17 Dec 2008
    23 Dec 2008
    Link to this post
    Hi,

    I want to customise how news is displayed. Ie I want to display news list on the left of the page while displaying the selected news content on the right. As far as I can see there seems to be no way of achieving this. Can you suggest a solution pls?

    Gpl
  2. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    23 Dec 2008
    Link to this post
    Hi Gpl,

    Thank you for contacting us.

    We assume you use NewsView public control. To achieve the required functionality you could drag and drop two NewsView controls into the page. Then, you should set the BehaviorMode property (Advanced tab > section Behavior) of the two controls - it should be Master for one of the controls and Details for the other. For more details have a look at the attached screenshot.

    Do let us know if this helps.

    Regards,
    Parvan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Gpl
    Gpl avatar
    7 posts
    Registered:
    17 Dec 2008
    24 Dec 2008
    Link to this post
    Thanks Parvan, That works, but in the default view i.e. when you open the news page first, both controls irrespective of the mode setting display news list. How do I make the the page select the first/latest news item when the page loads by default.

    thanks
    Gpl
  4. John
    John avatar
    32 posts
    Registered:
    08 Oct 2008
    26 Dec 2008
    Link to this post
    Hi Gpl,

    On the advanced tab on the NewsView, click on Paging > ItemsPerPage and set that property to the number of stories you'd like to see. By default, the NewsView shows the latest stories, sorted in descending order, so you just need to adjust the quantity of stories on the page. You can just show the title on one of the controls, but dragging the NewsView onto the page, clicking on edit, then go to Step 3 and add/remove the fields. You can also filter by category and tag using filter expressions. For more info, take a look at this article by Joseph Anderson.

    ~John
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    29 Dec 2008
    Link to this post
    Hi,

    Working with two NewsView controls on the same page showing different modes will be available from the next release.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Gpl
    Gpl avatar
    7 posts
    Registered:
    17 Dec 2008
    02 Jan 2009
    Link to this post
    Hi Ivan,

    Any ideas when the next release is due?

    Gpl
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    02 Jan 2009
    Link to this post
    Hello Gpl,

    Check out our Announcement section at http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-bthacb.aspx

    All the best,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Bart Welch
    Bart Welch avatar
    64 posts
    Registered:
    10 Jul 2009
    07 Oct 2009
    Link to this post
    Can this same layout be achieve for the Lists module?  i.e. display a list of the faq's in a column and then show the detail in the main page content or main column of the page.
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    07 Oct 2009
    Link to this post
    Hi Bart Welch,

    The current implementation of ListsDisplay does not support BehaviorMode as NewsView and the other ContentView base control. This will require to implement your custom logic that shows the single item content.
    We will migrate Lists module to Generic Content implementation from 4.0 and thsi feature will be supported out of the box.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Bart Welch
    Bart Welch avatar
    64 posts
    Registered:
    10 Jul 2009
    07 Oct 2009
    Link to this post
    By using the News View module and display a master and a detail version on the same page.  Can I default the detail display to automatically display the detail of the latest news article?
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Oct 2009
    Link to this post
    Hello Bart Welch,

    NewsView is a control it is not a module. The Behavior mode applies to the whole control so you cannot use it for a single item. I suggest that you should drop two controls. The first one will show all articles. The second one will show only the last article. For this control you should set Details mode.

    To sort the list you can use FilterExpression that will apply to the last item - For instance if you publish one news item per day you can filter only by Today, so that you will be sure that the last item is shown.
    Anothe option is getting the last item of your list sorted by Publication Date. In both the case you need to create a custom control that derives from NewsView and CreateDataSource method. Then call GetContent() method - it supports 21 overloads that you can use. I hope this helps.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
11 posts, 0 answered