Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:16:02+00:00 2026-06-15T18:16:02+00:00

I am using Kirby for my CMS. I setup a custom field and when

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:16:03+00:00Added an answer on June 15, 2026 at 6:16 pm

    WYSIWYG.

    enter image description here

    I’d suggest different approach…

    <ul class="credits">
    <?php
    foreach(array('Client' => $page->client(), 'Direction' => $page->art_direction(), 'Typeface' => $page->typeface()) as $key => $value)
    if($value != '') echo "\t<li><span>{$key}: </span>{$value}</li>\n";
    ?>
    </ul>
    

    Also, make sure you don’t indent <?php and that it starts from position 0.

    http://ideone.com/MBWLU0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm following these instructions: http://mark-kirby.co.uk/2008/using-git-and-github-on-os-x , and so far I've cloned the project
Using mercurial, I've run into an odd problem where a line from one committer
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Core Data, I have a fetch request to fetch the minimum of a
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo
Using EF Code First I have an model object that has multiple properties that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.