Posted by marioboro on September 20, 2011 at 9:35am
2 followers
Jump to:
| Project: | Content Templates (Contemplate) |
| Version: | 7.x-1.0-rc3 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hello,
i do not know what i´m doing wrong. I have create a custom content template and some fields are missing.
The field names are 100% correct.
OK:
title
field_projekt_subline
field_projekt_fallstudie
field_projekt_klient
not OK:
field_projekt_aufgabe
field_projekt_typ
field_projekt_url
field_projekt_bilder // This is an image.
Here is the code:
<div class="teaser single">
<div class="bottom">
<div class="headline default">
<div class="pos">
<h1><?php print $title;?></h1>
<p><?php print $node->field_projekt_subline[$node->language][0]['safe_value']; ?></p>
</div>
</div>
</div>
</div>
<div class="fix"></div>
<div class="content full">
<div id="main-content">
<div class="two-thirds">
<h3 class="title"><span>Fallstudie</span></h3>
<p><?php print $node->field_projekt_fallstudie[$node->language][0]['safe_value']; ?></p>
</div>
<div class="one-third last">
<h3 class="title"><span>Details</span></h3>
<div class="details">
<p><strong>Kient</strong><?php print $node->field_projekt_klient[$node->language][0]['safe_value']; ?></p>
<p><strong>Aufgabe</strong><?php print $node->field_projekt_aufgabe[$node->language][0]['safe_value']; ?></p>
<p><strong>Typ</strong><?php print $node->field_projekt_typ[$node->language][0]['safe_value']; ?></p>
<p><strong>URL</strong><?php print $node->field_projekt_url[$node->language][0]['safe_value']; ?></p>
</div>
</div>
<div class="fix"></div>
<h3 class="title"><span>Showcase</span></h3>
<div class='showcase two-col'><?php print $node->field_projekt_bilder[$node->language][0]['safe_value']; ?></div>
<div class='fix'> </div>
</div>
<div class="fix"></div>
</div>Please can somebody help me?
Thank´s
Comments
#1
What are the types of those fields? are they all textfields? do they have multiple values per field?
#2
works:
field_projekt_subline = text
field_projekt_fallstudie = long text
field_projekt_klient = text
works not:
field_projekt_aufgabe = list text (drop down menu)
field_projekt_typ = list text (drop down menu)
field_projekt_url = link
field_projekt_bilder = image
Thank´s
#3
Can you try current dev version? you'll need to click 'Delete' on the template to recreate it
#4
Thak´s for reply. But i have still the same problem. Could it be that i use false parameters?
Any normal text is displayed without problems. Only the fields that contains Array, Image and Taxonomy.
I have try now e.g.:
<?phpprint $node->taxonomy[5]->tid;
?>
<?phpprint $node->field_projekt_aufgabe['de'][0]['value'];
?>
#5
The field output should look like the existing field template
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>><?php if (!$label_hidden) : ?>
<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div>
<?php endif; ?>
<div class="field-items"<?php print $content_attributes; ?>>
<?php foreach ($items as $delta => $item) : ?>
<div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
<?php endforeach; ?>
</div>
#6
Sorry i do not understand what you mean.
Please can you show me what i have to do, to display my fields in my custom content template?
Thank´s