Closed (duplicate)
Project:
FileField
Version:
6.x-3.0-beta1
Component:
Documentation
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2009 at 20:46 UTC
Updated:
1 Apr 2009 at 20:57 UTC
I misadvertantly posted this as a cck issue before:
The filefield-versions 6.x-3.0-beta1-3 make all blank cck fields in my installation to display (empty) - if the cck field makes use of the filefield module. Particularly this affects imagefields and audio-filefields which i configured to play via swftools. I chose filefield version 6.x-3.0-alpha7 for now to run on my installation as this is the latest one not behaving in this way.
This is how the tpl.php code looks which i use to print my content:
<?php
// Format the teaser image
if ($field_image_standard_thumb) {
$image_standard_thumb = theme('imagecache', 'desaturate_-_resize_182px-110px', $field_image_standard_thumb[0]['filepath'], $node->title, $node->title);
}
?>
<div class="node">
<?php // Teaser view
if ($teaser): ?>
<h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<div class="meta">
<span class="submitted"><?php print $submitted ?></span>
<?php if ($terms): ?>
<span class="terms"> in <?php print $terms ?></span>
<?php endif; ?>
</div>
<div class="content">
<?php if ($image_standard_thumb): ?>
<div class="field field-type-image field-field-image-standard-thumb imagefield-nodelink">
<div class="field-items">
<div class="field-item odd">
<!--
<?php // Print the teaser image as a link to the full node.
print l($image_standard_thumb, 'node/'. $nid, array('html' => 'TRUE')) ?>
-->
<?php // Print the teaser image and link it to the fullsized image.
print l($image_standard_thumb, imagecache_create_url('scale_500px_max', $field_image_standard_full[0]['filepath']), array('html' => 'TRUE', 'attributes' => array('class' => 'imagefield-field-image-standard-thumb', 'rel' => 'lightbox[]', 'title' => $node->field_image_standard_full[0]['data']['title']) ) ); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php print $node->teaser ?>
<!-- Other content here -->
</div>
<?php // Full view
else: ?>
<div class="meta">
<span class="submitted"><?php print $submitted ?></span>
<?php if ($terms): ?>
<span class="terms"> in <?php print $terms ?></span>
<?php endif; ?>
</div>
<div class="content">
<?php if ($image_standard_thumb): ?>
<!-- Div wrap with class for the nodelink.
<div class="field field-type-image field-field-image-standard-thumb imagefield-nodelink">
-->
<div class="field field-type-image field-field-image-standard-thumb imagefield-gallerylink">
<div class="field-items">
<div class="field-item odd">
<!-- Print the teaser image as a link to the full node.
<?php
print l($image_standard_thumb, 'node/'. $nid, array('html' => 'TRUE')) ?>
-->
<?php // Print the teaser image and link it to the fullsized image.
print l($image_standard_thumb, imagecache_create_url('scale_500px_max', $field_image_standard_full[0]['filepath']), array('html' => 'TRUE', 'attributes' => array('class' => 'imagefield-field-image-standard-thumb', 'rel' => 'lightbox[]', 'title' => $node->field_image_standard_full[0]['data']['title']) ) ); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php print $node->content['body']['#value'] ?>
<?php if ($field_text_review): ?>
<?php print $node->content['field_text_review']['#children'] ?>
<?php endif; ?>
<?php if ($field_file_audio_preview): ?>
<?php print swf($node->field_file_audio_preview[0]['filepath']); ?>
<?php endif; ?>
<!-- Other content here -->
</div>
<?php endif ?>
</div>
Do I have to use a different syntax to print those kind of fields from filefield version 6.x-3.0-beta1 on?
Comments
Comment #1
quicksketchI'll answer your question in the original issue #414944: Blank CCK Fields displayed