In essence, I want to organize content based on a date field; first by year, and once a user clicks a particular year, it goes to months, and so on... possible?

For instance,

I click on 2016 views generated date link, I should see the following on the next page.

November, etc...

and finally, if I click on November, I will get to the actual listing of content for November.

I have already tried grouping by year, and then months. But it is not creating the hierarchy I am expecting. Should I create a display that groups content by years first? and then months?

closed as unclear what you're asking by Pierre.Vriens, kiamlaluno Feb 11 '17 at 11:02

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Could you provide more details? D7 or D8? Are these years and months simple links? Or should the already be populated with random content from within their time range? What have you tried so far? Please edit your question and clarify. – leymannx Feb 10 '17 at 20:31
  • This is called jumpmenu functionality. Views does have something like this, but I'm not sure if it's hierarchical. – mradcliffe Feb 10 '17 at 20:33
  • @leymannx - edited for clarification. My content type is already populated. I am just creating a view based on a date field. Stuck on creating the hierarchal page – user72657 Feb 10 '17 at 20:48
  • @mradcliffe- yeah, I don't think jumpmenu creates the date hierarchy I am expecting. I also need the months to be in the next page, not on the same – user72657 Feb 10 '17 at 20:49
  • The first thing that comes to mind, create three views. A year view, a month view and a day view. The year view doesn't receive an argument. The month view receives the year arguments and the day view receives the year and month arguments. Then it's just a matter of grouping based on the dates and displaying the data you need. On year you displays years for which you have data. On month you displays months on which you have data filtered by the year. On day you provide..titles? based on the year and months for you have data? – rovr138 Feb 10 '17 at 21:50

So for Drupal 7: Take look at this description: http://chrisshattuck.com/blog/how-create-monthly-archive-block-drupal-blog-views

This is basically an explanation of the "Archive" view (disabled by default) shipped with views. Take a closer look at it and copy it to apply a few minor changes.

It gives you a monthly grouping of your content if there is no argument passed. That is actually the trick. Instead of the "created" date of your content just use the date field you have as argument.

  • It doesn't seem to work for custom date fields? It is not providing any kind of granularity like in "Created date" default field... – user72657 Feb 13 '17 at 6:21

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