Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dgtlmoon CreditAttribution: dgtlmoon commentedWhat are the types of those fields? are they all textfields? do they have multiple values per field?
Comment #2
marioboro CreditAttribution: marioboro commentedworks:
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
Comment #3
dgtlmoon CreditAttribution: dgtlmoon commentedCan you try current dev version? you'll need to click 'Delete' on the template to recreate it
Comment #4
marioboro CreditAttribution: marioboro commentedThak´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 workprint $node->field_projekt_aufgabe['de'][0]['value'];
// Taxonomy Term: Do not workComment #5
dgtlmoon CreditAttribution: dgtlmoon commentedThe field output should look like the existing field template
Comment #6
marioboro CreditAttribution: marioboro commentedSorry 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
Comment #6.0
marioboro CreditAttribution: marioboro commentedUpdate