Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm doing some research and was wondering. I have some nodes which have links in the primary menu. These links in the menu are ordered by weight. Is it possible with this module to 'copy' that weight setting back into the node?
Reason for asking; the nodes in the menu are also being used in a view-block. And I would like them the have the same order as in the menu. This currently isn't possible with views (http://drupal.org/node/313140). So I was kinda hoping this module would help me with that issue :)
Cheers and have a good weekend!
Bartezz
Comments
Comment #1
ericclaeren CreditAttribution: ericclaeren commentedYeah this would be a great feature, saves lots of time when having lots of products in a menu.
Comment #2
NancyDruOkay, doing this on node creation is pretty easy, but what about on update? Or is it that we should always use the menu weight and not allow the user to specify a node weight?
Comment #3
NancyDruI think I answered my own question.
What I am doing is that if you want this option (it will be a module setting), then it will override the regular weight setting. If you delete the menu item, the last weight that was inherited will remain.
Comment #4
NancyDruFix committed to both branches.
Comment #5
Bartezz CreditAttribution: Bartezz commentedHey NancyDru,
Happy New Year :) Sorry for not replying earlier. Was on holiday for a couple of weeks. Anyway, thanx for this fix. I will update to the new module and let you know if there are any issues :)
Cheers
Comment #6
ericclaeren CreditAttribution: ericclaeren commentedWow great work! Thanks for this major improvement!
Comment #7
NancyDruComment #8
Bartezz CreditAttribution: Bartezz commentedHi Nancy,
Finally had some time to update to the new dev version. Here's what the results are;
- installed weight 1.x-dev jan 2009 on setup (fresh, without previous weight.module installation)
- admin/settings/weight checked 'use menu weight' and display on 'page' -> click update
- admin/settings/weight/setup -> 'x nodes need to be updated' -> click 'setup database'
- 'x nodes updated to support weight.module'
Not working??? Now when I go into edit mode of one of the nodes and check 'Node Weight' it's still 0. Eventhough it said it was updated?
Working!!! So I've set the 'node weight' manually for each node in node/1/edit, this works!
Working!!! Now when I go into node/1/edit and change Weight under 'Menu settings' it IS being adapted by weight.module
Not working??? When setting weights in admin/content/node these are NOT being stored, yet refreshing admin/content/node flags the nodes as 'updated'??? (EDIT: Using FF3)
If you need more information please let me know, happy to help make this dev version releasable :)
Cheers
Comment #9
Bartezz CreditAttribution: Bartezz commentedAfter reading; http://drupal.org/node/338090#comment-1211080
I checked and this is in the header;
Setting all the nodes to sticky doesn't resolve the issue!
Also, I'm not getting any javascript errors in webdevelopertoolbar in FF3.
So I started digging by calling admin/node/weight/_change_weight/1/-10 in the browser by hand... nothing happens....
So I looked at the function:
But i can't see where the weight parameter in _change_weight($nid, $weight) is actually being used???
Is there something missing here or am I missing it?
Cheers
Comment #10
NancyDruHmm, after loading the node, we should set the weight as entered.
This seems to be okay in 5.x, and, indeed helps with 6.x. However, the
admin/content/node
display in 6.x shows the same weight for any nodes that were updated in this session. But, if I then filter some out, the display shows correctly. Weird!Comment #11
NancyDruI committed that fix and it looks like it's working except possibly your second "not working." Please test this and confirm it.
Comment #12
NancyDruBetween this fix and #356335: Changing weight from contentpage doesn't work; throws httpRequest error, thsi should be fixed now.
Comment #13
Bartezz CreditAttribution: Bartezz commentedHi Nancy,
The changes in 1.xdev (25 jan) work!
Thanx for the quick response!
Cheers
Comment #14
NancyDruGreat. Thanks for the update.