Hi,
I just learning drupal and some items are not clear for me. To get different types of file attachable to nodes I create with CCK several new filefield fields (field_file_docu - to hold documentation attachments, field_file_firmware - to hold firmwares for this node, field_file_other - to hold other files). I selected in CCK to number of values to unlimited, so I can add more then one file in each catagory. I added a group to group all downloads.
If I create now a new content with the fields added I can upload files and they are displayed together with the node, very nice.
But I do not like the way the attachments are displayed, I prefer a table view and I want to have more fields like download count, license and more fields displayed. For license I have no idea how I can add such a meta information to a attached file.
I think I have to do this with views, but I played a little with it and was not successfully.
Could please anyone explain or point me to a documentation that explains how I can change the layout for all attached files (filefield) in all nodes (globally).
Thanks, Matthias
If I have understood your problem correctly, you can achieve this by defining your own "node-<yourcontenttype>.tpl.php". Describe all the content you require as fields, or references (or whatever you require) and theme them. Also don't forget to set the elements you want to be displayed (both in teaser and node views (look at "Display fields" tab in your content type configuration).
Google for "drupal theme content type" and you should get some help.
cheers - Ben
--- On Mon, 8/2/10, Matthias Fechner idefix@fechner.net wrote:
From: Matthias Fechner idefix@fechner.net Subject: [support] Change Layout of attached files to nodes To: "Drupal Support MailList" support@drupal.org Date: Monday, August 2, 2010, 1:53 PM Hi,
I just learning drupal and some items are not clear for me. To get different types of file attachable to nodes I create with CCK several new filefield fields (field_file_docu - to hold documentation attachments, field_file_firmware - to hold firmwares for this node, field_file_other - to hold other files). I selected in CCK to number of values to unlimited, so I can add more then one file in each catagory. I added a group to group all downloads.
If I create now a new content with the fields added I can upload files and they are displayed together with the node, very nice.
But I do not like the way the attachments are displayed, I prefer a table view and I want to have more fields like download count, license and more fields displayed. For license I have no idea how I can add such a meta information to a attached file.
I think I have to do this with views, but I played a little with it and was not successfully.
Could please anyone explain or point me to a documentation that explains how I can change the layout for all attached files (filefield) in all nodes (globally).
Thanks, Matthias
-- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook -- [ Drupal support list | http://lists.drupal.org/ ]
Am 02.08.2010 17:28, schrieb Benjamin Jacob:
If I have understood your problem correctly, you can achieve this by defining your own "node-<yourcontenttype>.tpl.php". Describe all the content you require as fields, or references (or whatever you require) and theme them. Also don't forget to set the elements you want to be displayed (both in teaser and node views (look at "Display fields" tab in your content type configuration).
Google for "drupal theme content type" and you should get some help.
great, that looks promising, I have to read and understand first how it is working, is not so trivial for a drupal newbie :)
I'll keep you informed.
Bye Matthias