0

I have a Drupal 7 site with a content type called Weekly Repeating Event, and events of this type repeat at the same time and day each week. I use a custom template file to display this node type by printing the fields, e.g.

print render($content['field_event_date'])

I understand how to use display types and how to make the repeat rule display, but for the life of me I cannot figure out how to display ONLY the dates that we list as "Exclude Dates."

I want the node to have a heading that says "No Meetings on the Following Dates" and to display any future dates from NOW (date the node was viewed) that the group is not meeting.

I can't figure out how to create a view of this, nor can I figure out how to make this happen within the template file.

All help appreciated.

0

What about doing this using views.

You can create a view that lists all nodes of your event type, and then add a filter that sorts on the excluded field.

If you are not familiar with views in D7 there is a great guide here.

I hope it helps you out.

  • Thanks for this - alas, I don't see an option anywhere in views to display excluded dates. Yes - you can filter by them - but you can't make them display. Let me know if I am missing something obvious. – alysaselby Jan 20 at 22:16
  • It should be possible to add the excluded date as a field. Make sure that your view show content of type weekly repeating event, hope it makes sense – Jdrupal Jan 20 at 22:38
  • wow - I just don't see a field for the excluded date. – alysaselby Jan 21 at 21:52
  • Sounds strange, and just to make sure the excluded date is a field in your content type? – Jdrupal Jan 21 at 22:24
  • No - the excluded date is not a field in the content type - only the Date is a field. The Date Module and the Date Repeat Modules provide a field to list dates you would want to exclude if your content type repeats. This is part of the rrule and looks like this in the database...looks like I can't upload an image so here is the data from the database: – alysaselby Jan 23 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.