I have an event lister that should show only the next upcoming event. The events happen on the 2nd Tuesday of each month. To solve this, I think I need to rely only on a filter-by-date and to put something like BETWEEN "19:00" to "19:00 +1 month" (the events are at 7:00pm), but it's just not quite right. It often shows two events on the days of the events.

I think I could muster this in plain php, but not sure how to write it in a single strtotime string.

Comments

arlinsandbulte’s picture

How about just setting your filter to > now and then setting the view's "Items to display" to 1?

texas-bronius’s picture

It's a good idea, but I may have shot myself in the foot by making each "event" as nodes with a date attached, and there can be any number of nodes with that same date. Each node represents a speaker at a given event. (and if a speaker were to come twice in a year, he'd actually have two nodes.. hmm)

If there is a better way to structure it, I am all ears! This site will have ~9 events a year, with 2-3 speakers per event, and each speaker has a bio and a mugshot. I didn't much like a node with multiple pairs of bio text and pics having to stay in parallel from the content editor's perspective.

arlinsandbulte’s picture

You are a little hard to follow in #2, but if you are open to restructuring:
Sounds like two content types might be in order:
Event content type describes the event and has a node reference CCK field to reference the speakers and a date CCK field for the event.
Speaker content type describes the speaker (photo and bio) and can then be referenced by the Event.

This way, you only enter each speaker's info once and use it multiple times in the Events....

texas-bronius’s picture

Status: Active » Closed (fixed)

Arlin- YES! So simple, thank you very much for the great tip! :D This is perfect.

dpatte’s picture

My issue is this.
I have several nodes, and each has a repeating cck date field.
For each node I would like to output to a table the next event from the repeating date list.
So for each node, I really want only none or one row.