I am using Kirby for my CMS. I setup a custom field and when I have nothing inside it, it still outputs a blank line.
Backend screenshot showing no field value: http://cloud.chrisburton.me/LSyR
View Source showing blank line (52): http://cloud.chrisburton.me/LSW0
My Code:
<ul class="credits">
<?php
if($page->client() != '')
echo '<li><span>Client: </span>'.$page->client().'</li>';
?>
<?php
if($page->art_direction() != '')
echo '<li><span>Client: </span>'.$page->art_direcion().'</li>';
?>
<?php
if($page->typeface() != '')
echo '<li><span>Typeface: </span>'.$page->typeface().'</li>';
?>
</ul>
How can I remove that?
WYSIWYG.
I’d suggest different approach…
Also, make sure you don’t indent
<?phpand that it starts from position 0.http://ideone.com/MBWLU0