Increase maximum weight of a flexinode field

george@dynapres.nl - January 25, 2007 - 13:27
Project:Flexinode
Version:HEAD
Component:flexinode.module (core)
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I'd like to see the maximum weight of a flexinode field to be increased from 10 to (a minimum of) 30 to accommodate (the manual sorting of) more fields.

AttachmentSize
flexinode-increase-weights.patch323 bytes

#1

Bèr Kessels - January 25, 2007 - 21:47
Status:reviewed & tested by the community» needs review

The code needs to be tested a little, however simple it is :)

I like the feature though, a weigth of ten limits teh ability to weight to only 20 fields, this is a rather small amount. Increasing makes sense.

#2

george@dynapres.nl - January 25, 2007 - 22:53

Actually, a weight of 10 limits it to 10 flexinode fields (not 20) if you don't want the fields to be sorted above the title (if you use a negative weight). Personally I would opt for more than 20, it's easily changed, however. Maybe the weight should be more dynamically calculated depending on the number of fields declared.

#3

Bèr Kessels - January 25, 2007 - 22:57

I think 30 is just fine.
Unless you feel an urge to make that dynamic increasing stuff, which sounds really nice (and usefull). But don't bother too much, IMO 30 will do fine.

#4

george@dynapres.nl - January 25, 2007 - 23:11
Version:4.7.x-1.x-dev» HEAD

Sorry, I felt a terrible urge (I work with large field sets). This patch determines the maximum weight dynamically.

AttachmentSize
flexinode-field-max-weight.patch 1.7 KB

#5

george@dynapres.nl - January 26, 2007 - 12:41

The maximum weight is now calculated globally (across all content types). Maybe it's better to calculate a maximum for each individual content type.

 
 

Drupal is a registered trademark of Dries Buytaert.