You are here

README.txt in Views Sort Null Field 8

Same filename and directory in other branches
  1. 7 README.txt
  2. 9.1.x README.txt
  3. 1.x README.txt
Views Sort Null Field
=====================

This module has for motivation the following problem:

  - You have a view listing nodes.
  - These nodes have a field on them, 'field_foo'.
  - You want to sort the view by this field, ascending.
  - Some nodes have nothing in this field.
  - Because of the way SQL sorting works, the nodes with no value are at the top of the list.

Use this in combination with the regular sort to place empty values at the bottom of a view, rather than at the top.

Example
-------

Order a list of nodes by an integer weight field, with empty values at the bottom.

Add the following sorts to the view:

1. Weight field, null sort, ascending
2. Weight field, ascending

File

README.txt
View source
  1. Views Sort Null Field
  2. =====================
  3. This module has for motivation the following problem:
  4. - You have a view listing nodes.
  5. - These nodes have a field on them, 'field_foo'.
  6. - You want to sort the view by this field, ascending.
  7. - Some nodes have nothing in this field.
  8. - Because of the way SQL sorting works, the nodes with no value are at the top of the list.
  9. Use this in combination with the regular sort to place empty values at the bottom of a view, rather than at the top.
  10. Example
  11. -------
  12. Order a list of nodes by an integer weight field, with empty values at the bottom.
  13. Add the following sorts to the view:
  14. 1. Weight field, null sort, ascending
  15. 2. Weight field, ascending