weight_in_tid cannot be 0?
killes@www.drop.org - June 4, 2009 - 11:40
| Project: | nodeorder |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
this remark is in nodeapi(update).
Is there a particular reason for this?
I'd like to see this (and the corresponding code) removed.

#1
Nodeorder's idea of weight (weight_in_tid) strays a little bit from the way Drupal generally thinks of weight. Nodeorder wants weight_in_tid to be unique across tids. Before 6.x, nodeorder used nodes' nids to set their initial weight_in_tid values. In 6.x, Nodeorder orders from 1 thru N where N is the number of nodes in a tid.
Why do you need to store 0 in weight_in_tid?
#2
Hmm, this concept is a bit strange...
I am just using nodeorder as I would use normal weights.
However, I am not using your UI at all, but use an external application to import the nodes. This application provides the ordering information and does it just as Drupal normally does.
I just want to save that information.
#3
Killes, 0 was chosen to indicate that nodeorder is turned off, i.e. it's sort of a default weight. That's why the check on 0 is done, because if the weight is 0 this denotes that there might be something wrong.
Nodeorder has support for Views. Normally, you'd use an url like http://www.example.com/nodeorder/6 which triggers nodeorder to show an ordered list of the nodes for term 6. However, you can also create a custom view and sort on the attribute weight_in_tid.
I hope this helps