Jump to content

Key check always returns true


Recommended Posts

I've been working on a custom staff page layout and I noticed that there's a condition check for biography section. 

{{if \IPS\Member::loggedIn()->language()->checkKeyExists( "core_staff_directory_bio_{$user->id}" )}}
    <div class='ipsType_richText ipsType_normal' data-ipsTruncate data-ipsTruncate-size="4 lines" data-ipsTruncate-type="hide">{lang="core_staff_directory_bio_{$user->id}"}</div>

The thing is that this checkKeyExists always returns true, regardless whether the bio exists or not. The logic behind this block here seems to be that it won't add any HTML elements between the if condition brackets unless biography is set. Am I wrong or is something else going on here?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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