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'>&nbsp;</div>
  </div>
  <div class="fix"></div>
</div>

Please can somebody help me?

Thank´s

Comments

dgtlmoon’s picture

What are the types of those fields? are they all textfields? do they have multiple values per field?

marioboro’s picture

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

dgtlmoon’s picture

Can you try current dev version? you'll need to click 'Delete' on the template to recreate it

marioboro’s picture

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.:
print $node->taxonomy[5]->tid; // Taxonomy Term: Do not work
print $node->field_projekt_aufgabe['de'][0]['value']; // Taxonomy Term: Do not work

dgtlmoon’s picture

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 ?>:&nbsp;</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>
marioboro’s picture

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

marioboro’s picture

Issue summary: View changes

Update