There are times where Drupal's default weight sorting mechanism is not enough to organize terms inside a vocabulary.
This module provides the infrastructure to allow other modules to set an arbitrary order of a given term specific to the user.
A good use case would be allowing users to re-sort data presented to them based on their interests. For example, if a site lists books, and you like reading romance rather than sci-fi, then you can re-order the terms without affecting the other users.
Usage:
In Code:
In your own custom modules you can call the function *taxonomy_term_weight_by_user_set_weight($term_id, $weight, $uid) to set the weight for a specific term as preference for a specific user.
Also you can get the current weight using the function *taxonomy_term_weight_by_user_get_weight($term_id, $uid)
* The uid is optional and when not provided the uid of the currently logged in user will be used.
Views:
This module provides an extra sorting type named "Taxonomy weight by User" if the view has a relation with Taxonomy Term. See the image above for reference.
This module also provides a Contextual Filter called "Taxonony weight by User: User id:", with this filter you can set a specific order or set a default value i.e Current logged user.
Project information
- Module categories: Content Editing Experience, Site Structure
- 4 sites report using this module
- Created by andreyjo0785 on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.