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.

Customising the CMS /

Calander model?


Reply


2 Posts   1088 Views

Avatar
samadeus

Community Member, 27 Posts

29 January 2009 at 12:35pm

I am looking for model that will let me announce on the next comming event in the community, how can i achive that?

I'm searching for that for months already, so any help is v.v.v. much appreciated!

Avatar
Carbon Crayon

Community Member, 598 Posts

29 January 2009 at 2:32pm

Edited: 29/01/2009 2:55pm

Hi Samadeus

Have you looked at the calender modules, one created by Navakia and the other by Uncle Cheese? They might be what you are looking for, or if you wanted something simpler you could jsut create some Event objects and filter them by date.

I have done something similar on [url=http://www.muswellhilltennis.com]this site[/url].

so my DataObject call looks like this:

return DataObject::get("EventPage", "EventDate >= CURDATE() ", "EventDate ASC");

So that will return events that are after today with the next event listed first. If you wanted only the next months events Im sure you could add some logic to figure our what the date will be in a month and just use that as a second filter like this:

"EventDate >= CURDATE() AND EventDate <= $MonthLaterDate"

hope that helps :)
         
EDIT: Ok just read your other posts, I'm guessing this wont mean much to you ;) I would recommend going through the tutorials to get an idea of how Silverstripe works and before that, if you havn't already, learn some HTML and CSS, as well as getting a basic understanding of PHP and Object Oriented programming. That probably sounds very daunting but is not as bad as it sounds and is quite essential to creating sites with Silverstripe. I would start here: [url]http://www.w3schools.com/[/url]