We are coming along. So far, we can theme the download nodes as we like, but the layout isn't quite how I'd want it. We need to create a new template file named views-view-fields--<view_tag_name>.tpl.php, or views-view-fields--downloads.tpl.php. Note that I changed the name for the view tag to "downloads" as opposed to the singular "download" that we used for the node type. This isn't necessary, and you may keep them consistent. This file is actually a copy of views-view-fields.tpl.php, which is located in the modules/views/theme directory, but I have completely changed the structure. You may modify it to suit your needs/wants/desires.
Inside of the views-view-fields--downloads.tpl.php file, paste the following:
<?php
// $Id: views-view-fields.tpl.php,v 1.6 2008/09/24 22:48:21 merlinofchaos Exp $
/**
* @file views-view-fields.tpl.php
* Default simple view template to all the fields as a row.
*
* - $view: The view in use.
* - $fields: an array of $field objects. Each one contains:
* - $field->content: The output of the field.
* - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
* - $field->class: The safe class id to use.
* - $field->handler: The Views field handler object controlling this field. Do not use
* var_export to dump this object, as it can't handle the recursion.
* - $field->inline: Whether or not the field should be inline.
* - $field->inline_html: either div or span based on the above flag.
* - $field->separator: an optional separator that may appear before a field.
* - $row: The raw result object from the query, with all data it fetched.
*
* @ingroup views_templates
*/
?>
<div id="download-view">
<div id="download-titlebar">
<span class="download-date">
<?php print $fields['changed']->content; ?>
</span>
<div class="download-title">
<?php print $fields['title']->content; ?>
</div>
</div>
<div id="download-body">
Originally posted on <?php print $fields['created']->content; ?>
<div class="download-description">
<?php print $fields['body']->content; ?>
</div>
<div class="download-filename">
<?php print $fields['field_filename_fid']->content; ?>
</div>
<div class="download-comments">
Comment count: <?php print $fields['comment_count']->content; ?>
</div>
<div class="download-tags">
Tags: <?php print $fields['tid']->content; ?>
</div>
</div>
</div>
We can now apply css styling to control the layout of the fields in the node, but first we have one more file to modify.
Create another file named views-view-unformatted--downloads.tpl.php, or better yet, copy modules/views/theme/views-view-unformatted.tpl.php and rename it. All we need to do is add the line
<?php print $classes['changed']; ?>
after the comment header, but before any actual code.