Recipe Making the Tracker Sortable

If you try to make each tracker field sortable, you may be disappointed with the result. If, for instance, you click on the Title column head, you will not get a nice alphabetical listing of all of the titles (even after setting each field in Views UI to be sortable).

Recent posts

Type

Blog entry

Blog entry

Blog entry

Blog entry

Page

Titled

taxonorny_ternn

Drupal issue bookmark

Function Reference for your site jQuery bookrnarklet to expand all fieldsets cvs download drupal -5

Author Replies Last Post drupaltips 0

drupaltips 0

drupaltips 0

drupaltips 0

drupaltips 0

1 day 23 hours ago

2 weeks 1 day ago

2 weeks 3 days ago

3 weeks 3 days ago

3 weeks 6 days ago

The URL may look right: http://YOURSITE.com/tracker?sort=asc&order=Title, but the sorting is definitely wrong ("c" does not come after "j").

This is because the tracker is preset to sort by date. So, only items posted at the same time would sort alphabetically. You may modify this behavior, if you prefer.

1. Go to views/admin/build, and override the tracker default view, by choosing Add.

2. Give the view a new name (sortable_posts) and new URL (sortable_posts).

3. Go to the Fields fieldset and mark all the fields as Sortable. If you like, you can save the view now, and see how it works (or how it doesn't work).

Sortable Default Sort

4. Change the Comment: Last Comment Time default sort from None to Descending.

5. In the Sort Criteria delete the Comment: Last Comment Date sort, by clicking on the Delete icon.

6. Save the view and open sortable_posts.

7. Click on the Title column header. The sort now works as expected.

Recent posts

Type

Titles

Author

Replies

Last Post

Admin Links

drupaltips

8 weeks 2 hours ago

Page

CVS

drupaltips

0

4 weeks 2 days ago

Page

cvs download drupal -5

drupaltips

3 weeks 6 days ago

Blog entry

Drupal issue bookmark

drupaltips

0

2 weeks 1 day ago

Blog entry

Function Reference for your site

drupaltips

2 weeks 3 days ago

Page

Handbook Hierarchy

drupaltips

0

28 weeks 3 days ago

Was this article helpful?

0 0

Post a comment