tags:

views:

18

answers:

1

When using the core drupal 'Upload' module, I get a user-friendly way of uploading files to my website and providing a download link on the page.

But the page is formatted like this:

Attachment         Size
Somefile.doc       13.37mb

Article contents here

And I would rather it was the other way around, showing the article contents before the attachments. I have explored how to do this and come up blank.

I'm using the 'Garland' theme if it makes a difference to how I can implement a solution.

+2  A: 

You must be using some module that changed that order. Or had it in use. Since Drupal-core has no way to re-order fields, and Drupal core upload-field has hardcoded its position in the form and in the display.

However, if you want to re-order fields in Drupal nodes, there are several ways:

The first option would be to solve this in your theme. But since you are using a vanilla (core) theme, changing the code of that theme is out of the question.

The second option, just as valid, but a lot more disrupting, is to involve the "CCK (content construction kit)" module. A warning is in place: this module is both complex and powerfull. Over 90% of the Drupal sites use this module, but since it is large and heavy, it will make your project a lot more complex, debugging a lot harder and performance a potential problem. Use CCK only if you think it fits well in your entire project, not just for re-ordering a set of fields.

The third option is to write a simple module that re-orders fields. With hook_form_alter(), you can change the appearance, workings and order of fields in any form, including the node forms. With hook_nodeapi(), you can change the behaviour of any node on many stages, including when it gets displayed: to re-order fields.

As said above: you may have such a module (with hook_nodapi) re-ordering your output, since Drupal core upload has the weight of that field hardwired.

berkes
That's exactly the pointer I needed. CK was installed and under the Content Types menu I found how to reorder the data displayed. Thankyou.
Jerub

related questions