Weight by content type (bulk node change)
shanep - February 10, 2009 - 17:47
| Project: | Weight |
| Version: | 5.x-1.3 |
| Component: | Documentation |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Is there a way currently to change the weight of all nodes in a content type? I have about 450 items in one content type and maybe 100 or so in another that I want all to be the same weight. Is there a way to bulk change them or do I have to change them all manually on the content page?
This could be a feature request if it isn't available. Thanks in advance!
Shane

#1
You can do it with a simple query in PhpMyAdmin. I don't see that there is enough need to add this to the module; if others disagree, I will revisit the issue.
#2
Ahh brilliant.. Do you know which table in the database I would need to update to do a bulk change? That would definitely solve a lot of individual changes. Many thanks!
Shane
#3
It would be the "node" table. Set the "sticky" column to -100 to be unweighted, non-sticky.
#4
Thank you much! I found a few tutorials on the web that were really helpful for new SQL users. Here's the SQL code I ended up using for a mass change of a content type:
UPDATE `my_database_name`.`node` SET `sticky` = '-40' WHERE `node`.`type` = 'your_content_type' LIMIT 300;
#5
That may be more complicated than is needed, but it should work.
I did just realize that I may be able to include a "Default weight" setting for enabling a content type. I will take a look. Oh, I can only do this in the 6.x version because of differences between D5 and D6.
#6
Committed to 6.x only.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.