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 :)

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.

  • 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 May 7 '13 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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