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?

2
  • do you found a solution? Aug 4, 2016 at 14:23
  • Nope, I have yet to find a solution to this. Been scouring everywhere but keep hitting dead ends. Aug 11, 2016 at 19:53

1 Answer 1

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.

2
  • 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. Jul 13, 2016 at 17:39
  • @ACanadianCoder check this ostraining.com/blog/drupal/d8-dates Jul 13, 2016 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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