Hello,
I have added in the blueprint a More info field with link.
But when the field is empty, it show the link but the href is empty.
echo '<a href="'.$event->getField("link").'" target="_blank">More info</a>';
How can I hide the whole line when it’s empty?
Thx for helping.
<?php
$tmpDate = getdate(0);
$currentDate = getdate();
?>
<div class="calendar">
<?php if (!$calendar->getAllEvents()): echo l::get('calendar-no-entry'); else: ?>
<?php foreach ($calendar->getAllEvents() as $event): $date = $event->getBeginDate(); ?>
<ul>
<li>
<strong><?php echo $event->getBeginHtml(); ?> : </strong>
<?php
echo $event->getField("summary");
echo '<br />'.$event->getField("description").' ';
echo '<a href="'.$event->getField("link").'" target="_blank">More info</a>';
?>
</li>
</ul>
<?php $tmpDate = $date; ?>
<?php endforeach; ?>
<?php endif; ?>
</div>