Introduction
The Weight module adds a weight option to enabled node types. Nodes with lower weight will float to the top of lists, while heavier items will sink to the bottom of lists. This is useful for sorting non-chronological nodes like bios, e-commerce products, or whatever you would like and for ordering nodes on the front page.
The "standard" Drupal sort order for nodes is by sticky, then by created date. Weight uses the node table's 'sticky' column to store weights as well as sticky information (so that feature is not lost). So then nodes will be sorted first by stickiness, then by weight, then by creation date.
This is a simple module with a simple purpose that can add a lot of value to your site with very little overhead.
Installation
Standard module installation applies.
Drupal 7.x-2.x
NOTE: Version 3 is used differently. See below for details.
Permissions
- assign node weight
- Allow modification of node weights.
- administer weight
- Administer configuration of the weight module.
Menu items
The only menu item is for the settings (see below).
Settings
To enable Weight for a content type, go to Administration » Structure » Content
types and select the content type you want to enable Weight for. Select the Weight
vertical tab, choose your desired settings, and click the Save button.
Setting weights
There are principally two ways of setting a node's weight. The first is when the node is created or
edited. The second is through the Content administration page.
Add / Edit
For enabled content types and users who have the appropriate permission, a fieldset will be added to
the node form for "Weight." Within this fieldset, you will find a selector box for the weight.
Content administration
On the Content administration page (Administration » Content), there will be a "Weight"
column containing a selector box to set the weight of any node with a content type that has been weight enabled.
Drupal 7.x-3.x
The module provides a new field type and widget called "weight" that can be added to a content type like any other field.
Drupal 6
Permissions
- assign node weight
- determines whether or not a user may set a node weight on the Add/Edit screen.
Menu items
The only menu item is for the settings (see below).
Settings
The module administration is at Administer » Site configuration » Weight. Access to this page is controlled with the administer site configuration permission.
- Node Weight Range
- This sets the range of weights that will be available.
- Display On
- This selects the content types that will be allowed to use weights.
Setting weights
There are principally two ways of setting a node's weight. The first is when the node is created or edited. The second is through the Content administration page.
Add / Edit
For enabled content types and users who have the appropriate permission, a fieldset will be added to the node form for "Node Weight." Within this fieldset, you will find a selector box for the weight.
Content administration
On the Content administration page (Administer » Content management » Content), the "Operations" column will contain a selector box for the weight of any node with a content type that was selected on the settings page.
Comments
Views integration
There's also the undocumented views integration. You can create a view with the style "Weight changer" in order to create a drag'n'drop interface. Pretty easy to figure out.
Can You tell how to theme that view?
I have seen this option, but i really dont know hot the template weight-view-weight.tpl.php
must look like.
Is there Information on that?
Cheers
readme
I think the only documentation is in the readme file.
NancyDru
Drupal 7 and Draggable Views
I'd like to highlight and call attention to Weight's views integration feature as an alternative to using DraggableViews ( http://drupal.org/project/draggableviews ) - which I have been unable to get working in D7.
To create a draggable view using the weight module:
Your draggable view should now work as expected.
Note: I've encountered about couple of bugs, which I'm researching further and may end up filing bugs against.
(A) The order of the fields has an effect on the draggable function. For example field order TITLE, WEIGHT, OTHERFIELD displays the draggable icon whereas WEIGHT, OTHERFIELD, TITLE does not.
(B) I have a draggable view that works correctly when accessed directly. However when I use views_embed_view to place the view under a vertical tab the draggable icon disappears. You can still reorder by showing and adjusting row weights.
Cheers!
Chris
Chris Luther
weight is not saved in image banner
after uploading images , i want to save weight but weight is not saved please give solution
Weight is not working after Upgradation
Hi,
I have upgraded Drupal from Drupal 7.10 to 7.16. But after the upgrades the weight is showing against the content types but its not working. Any help would be appreciated. Do let me know if your required any other information regarding that. Thank You
Issues Queue
Your issue will get much more attention if it is posted in the module's issue queue. http://drupal.org/project/issues/weight
NancyDru
There is no "Weight vertical
There is no "Weight vertical tab" any more.
To use you have to add new field Weight to content type.
Thank You
Thank You, I've been searching for it for a couple of hours :) :)
thanks, the documentation needs updating, was going crazy!
thanks, the documentation needs updating, was going crazy!
Thanks, I could have keep on
Thanks, I could have keep on looking for hours without your comment...
I was looking for it as well.
I was looking for the "Weight vertical tab" as well. info999 thanks for pointing this out!