0

I have a custom content type of "Press Release." I would like to make an archive listing of the press releases, based on a "release date" field in the content type. The archive view built into views uses the "content: created" date, and I can't figure out how to make it work with this other date instead. (This is Drupal 7.)

Any help would be appreciated. Thanks.

1

You have to install the Context module and make sure the the Date Views and Date Context modules are also enabled. Then your date fields will appear in the format:

Field: Date (field_machine_name)

Contextual filters based on these fields have the same formatting options as those based on node creation date.

0

Basic directions follow -- apologies if you've already done this!

  1. Edit View.

  2. Under "Sort Criteria", click Add.

  3. Locate the field you want to sort by and add it by clicking the checkbox next to it and then next. Set it to Sort Descending so newest items are first.

  4. Click "Content: Post Date" and delete the field by clicking the "Remove" button.

Still doesn't work?

You might have the "release date" field as text instead of a UNIX timestamp or otherwise. I'm not sure how well a simple string will sort -- you might need a date field instead.

5
  • I have followed your directions, but it still is grouping by the created date, not the release date field. But don't I also have to edit the contextual filter of the view? That's still set to "Content: Created year + month". And there's no similar settings for other date fields. I would attach a screencap here but I don't know how to do that, either. :-) Aug 1 '12 at 14:09
  • Ah, forgot about that. Yes, you'll need to do the same thing with the contextual filter, recreating it as close to the original as possible.
    – aendra
    Aug 1 '12 at 15:30
  • I put the release date in the contextual filter slot, although as I said, there are no choices for formatting like there are with the created date, "month + day," etc. And it's still not working - I still get a display based on the created date, not the release date. Aug 1 '12 at 18:13
  • What type of field is the "release date" field? Is it simply a text field or is it a Date field?
    – aendra
    Aug 2 '12 at 8:39
  • Release date is definitely a date field. Aug 2 '12 at 15:18

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.