Current

Component ID

1985548

Component name

Current

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module sets out to provide a solution to complex date sorting of content that cannot be achieved with Views without query modification. It presents content, displayed in a sorted order based on date fields and their relationship to now.

Use Case

For example, you may have two content types that you would like to display in the same content feed: News and Events. News has a date field called 'Publication Date' and Events have a date field called 'Start Date'. The problem is that Publication Dates are dates that have passed, whereas start dates have not yet arrived. By allowing you to choose the sort order of these fields at the content type level, we can create a feed of this content that logically sorts itself and presents the most Current content amongst the sorted content types.

Features

  • Complex date logic for content listings
  • Provides a views plugin and a standalone version
  • Create custom 'current' blocks that pull in content types that can be sorted independently of each other.
  • A views sort handler (requires views) that allows for specificity of field / content type sorting.
  • Both of these solutions use a singular mysql query for maximum performance.

Requirements

  • Drupal 7
  • Block module
  • Views (optional) in order to use views sort feature.