2

I have a Theatre website that I'm creating in Drupal 8, and I need to create an Event content type. This content type will be displayed on an Events page listing all Events in ascending order from closest date to latest. (I'm pretty sure I can get Views to do this.)

This is how each node should look like when listed on the Events page.

Basic Event Listing

I know I need to create fields for:

  • Event Poster
  • Event Presenter
  • Name of the Event (This would be the Title Field)
  • Day(s) of the event
  • Time(s) of the event
  • Event price(s)
  • Link to external Ticketmaster-type website to purchase tickets

The problem I have is that not all events are only set up to be on one day or at one time; some events may be listed like the following (Where there are multiple time listings for the day) or some might be where the event is being held for multiple days and may have different times of when it is being held.

Multi-Date/Time Listings

What field type should I use for the datetime field? Is there a special module I should get for this that allows multiple dates to be listed? Do I even need to worry about a special Time field or do I just keep it as a plain text field for the user to just type in the time(s)?

TL;DR: How do I create a date field that allows to list multiple days (maybe times) and then sorting the content type by the days of the event in ascending order?

  • do you found a solution? – Adrian Cid Almaguer Aug 4 '16 at 14:23
  • Nope, I have yet to find a solution to this. Been scouring everywhere but keep hitting dead ends. – ACanadianCoder Aug 11 '16 at 19:53
1

You can use a Date field with an End Date (I don't have at this moment Drupal 8 installed to show you how)

With Views you can configurate your field to show the Start Date and the End Date. For use the format of Date in one place and Time in another place, you need to create a new Date format.

Maybe this question can be interesting for you: When should I use collect an end date for a field, instead of using 2 separated date fields?. Or have a look at How to Add a Custom Date Format in Drupal 8.

  • What do you mean by create a new Date format? Could you give me an example? Basically, if I use the datetime field for the Date and then have them select multiple dates, is it possible to then have it show up as: (ex. Sept 1-5, 2016 instead of it printing each date on a new line)? And then say that there are multiple times for the different dates, can I not have it print on its own line, 2:00pm & 7:00pm since those would be the only 2 time slots on those dates? Let me know if I'm not being as clear as possible. Thanks. – ACanadianCoder Jul 13 '16 at 17:39
  • @ACanadianCoder check this ostraining.com/blog/drupal/d8-dates – Adrian Cid Almaguer Jul 13 '16 at 17:42

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.