Our calendar is great for telling people what events are going to happen on what days. However, we are going to add some text underneath the calendar to say what events are coming up. So, no matter what month is actually being displayed, the next five events from today are always going to display underneath.
1. To do this, we need to edit the
calendar/index
weblog one more time.2. The code we are going to use is, in many ways, identical to the code we used in the
calendar/event
weblog. The main differences are that we are going to limit the number of entries to five, sort them in chronological order (ascending), and use a parameter calleddynamic="off"
. We have used this before, and it essentially decouples the weblog from the URL. Typically, ExpressionEngine uses the URL of the page to determine what entries to display. Withdynamic="off"
, if today is April, the first five entries would display no matter what calendar month we were viewing...