Automatically show this month and next month in a perpetual calendar

One of our clients is Programming Librarian, a site for librarians to plan educational programs. Programs, like many events, are often seasonal, oriented around holidays and seasonal activities.

ECA model showing a flow creating a custom block that loads a block for this month and next month and puts them together with a gutter.

The site has a block for each month of the year, containing content for that month. It has a custom field for the month number.

For the home page, we used Drupal's Events, Conditions, and Actions (ECA) module to automatically combine the block for this month with the block for next month, as a new block. Then we were able to simply drop the combination block on the home page.

Now whenever you visit the home page, you always see this month and next month, and the staff don't have to think about changing this each month!

Seems like you could create the first block by listing all the events matching "NOW" with a granularity of month (the Smart Date module adds date granularity to views filters) and the second block could be similar but matching "+1 month". Entirely possible the site isn't using Smart Date, but thought I would point that out as an alternate solution.

Add new comment

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <blockquote cite> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h1> <h2 id> <h3 id> <h4 id> <h5 id> <p> <br> <img src alt height width>
  • Lines and paragraphs break automatically.