Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

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

NewsModule Slideshow


Reply


3 Posts   1069 Views

Avatar
borriej

Community Member, 267 Posts

20 October 2010 at 3:19am

Edited: 20/10/2010 3:21am

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.

Avatar
Mad_Clog

Community Member, 78 Posts

20 October 2010 at 3:41am

Edited: 20/10/2010 3:42am

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 [url=http://jquery.malsup.com/cycle/]jQuery.cycle[/url]

Avatar
borriej

Community Member, 267 Posts

20 October 2010 at 4:17am

Edited: 20/10/2010 4:19am

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.