0

I want to change the order of the fields in each node. I know that I can use CCK but I would like to do this in hook_node_load

Is it possible?

Thx :)

1 Answer 1

0

In my views cck will always overwrite the weight you assign programmatically, best way should be arranging the cck fields in order you want. If you want to change order on the fly using javascript can be an option too,but not sure if it is good option for example

jQuery('.field-name-field-test-taxonomy').insertAfter('.field-name-field-simple-text-field');

where ".field-name-field-test-taxonomy" and ".field-name-field-simple-text-field" are the wrapper div for cck fields respectively.with out the above js code the default taxonomy field was coming before the simple-text field but with we simply change the order. hope it helps.

1
  • you can also use panels to theme the node template for that content type and using selection rules and can easily decide the order of cck fields.
    – arpitr
    Commented May 7, 2013 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.