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
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

marcp - June 4, 2009 - 14:14

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

killes@www.drop.org - June 5, 2009 - 10:24

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

pvanderspek - June 6, 2009 - 12:20
Category:bug report» support request
Status:active» by design

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

 
 

Drupal is a registered trademark of Dries Buytaert.