Taxonomy term weight by user

Categories

Component ID

2075339

Component name

Taxonomy term weight by user

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

434

Component created

Component changed

Component body

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.

This module is developed and maintained by:
Anexus IT