0

I'm looking for a way to only show elements related to a specific day in the week. Let's assume that the url to the view is: /program/schedule. What I would like is that when you go to: /program/schedule/monday, only the info related to the monday is displayed.

Now I already figured out the contextual filters and that I can limit the valid values to: monday, tuesday, wednesday, et cetera. This is not the problem. The problem that I'm having is that it seems that my date time field needs to have an input of a specific date like 20130902.

I also need to point out that I am able to format my date time field to only show as a day of the week (with date formatting), but this does not seem to impact the contextual filter.

Is there a way to achieve this? Maybe with hooks or something custom?

1 Answer 1

0

Views Day of Week provides a simple filter plugin for Views 3 to enable filtering content that should be visible based on the current day of the week.

Example: With this module you can select that some content should be visible only on Mondays, some on Tuesdays and Thursdays and some only on Fridays.

1
  • The problem is that I do not have the ability to create a field with a dropdown where you can select the day. The problem is that there only is a date time field (that holds the datetime when an event is shown). So the data is hold as a date time value, but true the input of the contextual filter, it should see the date time as a day of week (with or without the use of the date format that I put on the field). This module seems to need an extra field, and this is not what I want.
    – Quirexx
    Sep 4, 2013 at 8:49

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.