Habe nun nur noch ein Problem:
Wenn ich einen Betreuer eingetragen habe funktioniert alles schön und gut, ist kein Betreuer eingetragen erscheint nicht ein mal der label "Betreuer" im Feld.
Das verstehe ich nicht so ganz. Code steht unten.
http://tff-kassel.de/contao/index.ph...technik-1.html
Code:
<?php if (count($this->entries)): ?>
<div class="lehrveranstaltung">
<div class="layout_full">
<?php foreach ($this->entries as $entry): ?>
<table class="item" >
<tr class="tr1" >
<td class="field SWS">
<div class="label"><?php echo $entry['data']['SWS']['label']," "; ?></div>
<div class="value"><?php echo $entry['data']['SWS']['value']; ?></div>
<div class="label"><?php echo $entry['data']['Credits']['label']," "; ?></div>
<div class="value"><?php echo $entry['data']['Credits']['value']; ?></div>
</td>
<td class="field V">
<div class="label"><?php echo $entry['data']['V']['label']; ?></div>
<div class="value"><?php echo $entry['data']['V']['value']; ?></div>
<div class="clear"></div>
<?php if ($entry['data']['Ue']['value']!=0):?>
<div class="label"><?php echo $entry['data']['Ue']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Ue']['value']; ?></div>
<?php else :?>
<div class="label"><?php echo $entry['data']['Ue']['label']?></div>
<div class="value">0</div>
<?php endif; ?>
</td>
<td class="field Lehrveranstaltung" colspan="2">
<div class="value"><?php echo $entry['data']['Lehrveranstaltung']['value']; ?></div>
</td>
<td class="field Sprache">
<div class="label"><?php echo $entry['data']['Sprache']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Sprache']['value']; ?></div>
</td>
</tr>
<tr class="tr2">
<td class="field vorlesung_uebung" colspan="3">
<div class="label"> Vorlesungstermin: </div>
<div class="value"><?php echo $entry['data']['tag_vorlesung']['value'],", ", $entry['data']['start_vorlesung']['value']," - ", $entry['data']['end_vorlesung']['value'],", ", $entry['data']['raum_vorlesung']['value']," (" ,$entry['data']['gebaeude_vorlesung']['value'],")" ; ?></div>
<div class="clear"></div>
<div class="label"> Übungstermin: </div>
<div class="value"><?php echo $entry['data']['tag_uebung']['value'],", ", $entry['data']['start_uebung']['value']," - ", $entry['data']['end_uebung']['value'],", ", $entry['data']['raum_uebung']['value']," (", $entry['data']['gebaeude_uebung']['value'],")" ; ?></div>
</td>
<td class="field Betreuer" colspan="2">
<div class="label"><?php echo $entry['data']['Betreuer']['label'];?></div>
<div class="value"><a href="index.php/mitarbeiter.html"><?php echo $entry['data']['Betreuer']['value']; ?></a></div>
</td>
</tr>
<tr class="tr3">
<td class="field Pruefung" >
<div class="label"><?php echo $entry['data']['Pruefung']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Pruefung']['value']; ?></div>
</td>
<td class="field Studiensemester" colspan="2">
<div class="label"><?php echo $entry['data']['Studiensemester']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Studiensemester']['value']; ?></div>
</td>
<td class="field Dozent" colspan="2">
<div class="label"><?php echo $entry['data']['Dozent']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Dozent']['value']; ?></div>
</td>
</tr>
<tr class="tr4" >
<td class="field Voraussetzung" colspan="5">
<div class="label"><?php echo $entry['data']['Voraussetzung']['label']; ?></div>
<div class="value"> <?php echo $entry['data']['Voraussetzung']['value']; ?></div>
</td>
</tr>
<tr class="tr5">
<td class="field Lernergebnis" colspan="5">
<div class="label"><?php echo $entry['data']['Lernergebnis']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Lernergebnis']['value']; ?></div>
</td>
</tr>
<tr class="tr6">
<td class="field Inhalt" colspan="5">
<div class="label"><?php echo $entry['data']['Inhalt']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Inhalt']['value']; ?></div>
</td>
</tr>
<tr class="tr7">
<td class="field Literatur" colspan="5">
<div class="label"><?php echo $entry['data']['Literatur']['label']; ?></div>
<div class="value"><?php echo $entry['data']['Literatur']['value']; ?></div>
</td>
</tr>
</table>
<?php endforeach;?>
</div>
<?php else: ?>
<p class="info">Invalid item reference for catalog.</p>
</div>
<?php endif; ?>
P.S.: Derzeitige Lösung ist per
Code:
<td class="field Betreuer" colspan="2">
<div class="label"><?php echo $entry['data']['Betreuer']['label'];?></div>
<?php if ($entry['data']['Ue']['value']!=0):?>
<div class="value"><a href="index.php/mitarbeiter.html"><?php echo $entry['data']['Betreuer']['value']; ?></a></div>
<?php else :?>
<div class="label">Betreuer: </div> <br>
<div class="value">Zu dieser Vorlesung gibt es keinen Betreuer.</div>
<?php endif; ?>
</td>
selbst eingebaut.
Lesezeichen