[development] Node Weighting

Marc Poris marc at funnymonkey.com
Mon Mar 19 21:08:39 UTC 2007


Earnie,

There is clearly a need for alternative ways of ordering nodes.  The 
weight module does exactly what FGM said earlier in this thread.  One of 
its limitations is that the granularity is still too coarse -- -100 for 
non-sticky, and 1 to 100, or something like that for sticky.

Nodeorder only works within individual taxonomy categories.  It adds a 
'weight_in_tid' field to the term_node table.  It has infinite 
granularity as far as ordering goes, but it is not universal across all 
nodes.  The way it works is that it initializes weight_in_tid to the 
node's nid, and then, when nodes are ordered within a tid, their 
weight_in_tids are swapped or moved around.

Whether or not this needs to be a core feature is probably up for 
debate.  It seems that you could create a small contrib module that 
tacks on another weight field to each node, and then you could somehow 
use Views to make sure that your new weight is used all or most of the 
time..??..

Marc



Jakob Petsovits wrote:
> On Thursday, 15. March 2007, Earnie Boyd wrote:
>   
>> Currently there is no method other than modifying the publishing date
>> to order a node.  This becomes important mainly with the Top Sticky
>> flag where the node is meant to provide first experience data.  I would
>> like to consider adding to the Publishing Options a Node Weight to add
>> to the sorting criteria for the node display. 
>>     
>
> Note that there are already two contrib modules that serve a similar purpose:
> - Weight (http://drupal.org/project/weight), and
> - nodeorder (http://drupal.org/project/nodeorder)
>
> If you want to get this into Drupal core, you might fetch some ideas from 
> those.
>
>
>   




More information about the development mailing list