Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Calander model?

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

Page: 1
Go to End
Author Topic: 1024 Views
  • samadeus
    Avatar
    Community Member
    27 Posts

    Calander model? Link to this post

    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!

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Calander model? Link to this post

    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 this site.

    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: http://www.w3schools.com/

    1024 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.