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
Comments
Comment #1
nancydruYou 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.
Comment #2
shanep commentedAhh 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
Comment #3
nancydruIt would be the "node" table. Set the "sticky" column to -100 to be unweighted, non-sticky.
Comment #4
shanep commentedThank 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;
Comment #5
nancydruThat 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.
Comment #6
nancydruCommitted to 6.x only.
Comment #8
1kenthomas commentedBecause not every end user is going to have PHPMyAdmin access... possibly this can be addressed in VBO, (there's Lullabot code, I believe, that's very close to doing this).
Comment #9
nancydruIf you post is to make a point, it's lost on me. Please open a new issue (you can reference this one) and let the 2.5 year old sleeping dog lie.