Jump to content

Title of a field doesn’t display


rooofl
 Share

Recommended Posts

Hello, since a long time I am stuck on this probably stupid issue.

I have two very similar fields: font keywords and font license.

When I try to display the titles of the keywords, everything is just fine but for the titles of font licenses, things goes weird:

// Keywords

  $keywords = $font->keywords;
  if ($keywords){
    echo "<li><ul class='keywords'>";
    echo "Keywords:";
    foreach($keywords as $keyword){
      echo "<li><a href='{$keyword->url}'>{$keyword->title}</a></li>"; // ok, the list of the keywords is displayed
    }
    echo "</ul></li>";
  }

// License

  $license = $font->license;
  if ($license){
    echo "<li><ul class='license'>";
    echo "License:";
      echo "<li>{$license}</li>"; // displays the id of the matching license
      echo "<li>{$license->title}</li>"; // displays nothing 
    echo "</ul></li>";
  }

I checked my license field and everything looks normal. Can you help me to find what is wrong ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...