Jump to content

Event list grouped by month


hnns
 Share

Recommended Posts

Hey,

i've just found ProcessWire a few hours ago. I thinks it's great! Just one question, so maybe i can use it for my new project.

I want to realize an event list, is it posibble to group the events by months without any trouble?

Cheers

Hnns 

Link to comment
Share on other sites

Welcome to PW Hnns!

A few hours ago and your are ready to roll? You are fast! ;).

PW does not have a native events lister. There is a module and/or code for events listing I have seen here in the forums but can't seem to find it at the moment. Will post back if I find it if someone else doesn't do so b4 me. If you can't wait, maybe search the forums for it? 

Have a nice time here! :)

Edit:

Here's one:

http://processwire.com/talk/topic/3006-display-a-list-calendar-using-a-date-field/

Link to comment
Share on other sites

Stolen from the blog profile. This will get all events for the month of May, 2013

            $firstDay = strtotime("2013-05-01");
            $lastDay = strtotime("+1 month", $firstDay)-1;

            $events = wire('pages')->find("template=event, date>=$firstDay, date<=$lastDay, sort=-date");
 

The rest of it is in the archives.php template.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...