What is the easiest way to allow users to sort a story view by content type or date? Is there a module that would allow you to do so? The idea would be to have a drop down list containing the different content types and a calendar widget (or perhaps also drop down lists) which would allow users to determine a date range.

If this can only be achieved programmatically, no need to provide much detail -- I suspect it would be a rather long explanation and don't want to take that much of anyone's time.

1 Answer 1


i think you might be confusedly mixing a few different concepts?

"story" is one of the default/example content types distributed with Drupal and is nothing special, ie. not quite sure what you mean by "story view".

I assume from the way that you're phrasing your question that you're new to Drupal, have you discovered Views and CCK?

exposing filters is relatively easy in Views 2 and 3, but exposing sort options in general is more difficult in Views 2 (you'll probably need some basic PHP knowledge to achieve this) but can be done through the UI in Views 3.

popup calendar widgets for date fields exist in the Date module once you install the jQuery UI module.

if you want a calendar widget that is "inline" (doesn't popup from a dropdown menu) then you'll likely have to do a little coding, but it isn't very hard as jquery UI provides a good API for inserting calendars into your page.

  • Yes thank you for your reply. I did indeed phrase that rather incorrectly. I didn't mean specifically stories, but content in general. I'm new to Drupal in the sense that I'll always be new to Drupal! ;-) I've been using it rather extensively for months now but I don't think CMS logic will ever come naturally to me! Thank you for your advice, naturally, yes I am using CCK and Views, I'll see how far I can go based on the info you've given me without having to do any php. Thanks!
    – Jane
    Sep 11, 2011 at 12:54
  • 1
    ah, hang in there :) a quick word of caution - if you're already using Views 2 on a site and you want to swap to Views 3, some of your views might break or behave badly until you rebuild them, and some older modules are incompatible with Views 3 so backup your database before migrating. Sep 11, 2011 at 12:59
  • 1
    oh, also note that what you've described in your dropdown lists are both exposed filters, not sorts, so you might find this useful - drupal.org/project/better_exposed_filters Sep 11, 2011 at 13:01
  • Thanks! This is a Drupal 6 site, I was under the impression Views 3 was a Drupal 7 module...?
    – Jane
    Sep 11, 2011 at 13:17
  • Views 3 is available for both D6 and D7, look at the version numbers on the project page - drupal.org/project/views. My experience is that alpha3 for Views 3 is actually buggier than the latest dev version, so get "6.x-3.0-dev" (right at the bottom). Sep 11, 2011 at 13:43

Your Answer

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

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