Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » NewsModule Slideshow

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 937 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    NewsModule Slideshow Link to this post

    I want to create a newsModule which displays a number of recent news items, but not in the default way.

    I want to create a slideshow with (lets say) 4 summaryzed articles.
    A few buttons: Next Article, Previous Article, Read More buttons

    Red square could be a uploaded image.

    already got this function running:

    function LatestNews($num=5) {
    $news = DataObject::get_one("PageNieuwsArticleHolder");
    return ($news) ? DataObject::get("PageNieuwsArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
    }

    Could you give me some clues on how to accomplish this new newsModule?
    Rather not use flash, but if it is the best way Im willing to explore.

  • Mad_Clog
    Avatar
    Community Member
    78 Posts

    Re: NewsModule Slideshow Link to this post

    Just put all the news elements in their own HTML element and do the rest with javascript / jQuery.
    Finding a jQuery script that will suit your needs shouldn't be a problem.
    One plugin i use a lot is jQuery.cycle

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: NewsModule Slideshow Link to this post

    Ok nice, have read the demo's. See that it can slide text with images, but can it also fade text + images?

    Is there a way to automatically put the html links into the slider?

    With this function it already show the 5 latest articles:

    function LatestNews($num=5) {
    $news = DataObject::get_one("PageNieuwsArticleHolder");
    return ($news) ? DataObject::get("PageNieuwsArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
    }

    So i need to get the link of those articles and print them inside the slider.

    937 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.