Jump to content

Sorry another if statement question - hiding fields


tenaki

Recommended Posts

Sorry another one. I am using <if> to hide custom fields in my template if the fields are left empty which works fine

{{if count( $record->customFieldDisplayByKey('county','display') )}}
         {$record->customFieldDisplayByKey('county', 'display')|raw}
          {{endif}} 

But if I add list items <li> or breaks <br />they are visible 

{{if count( $record->customFieldDisplayByKey('county','display') )}}
         <li> {$record->customFieldDisplayByKey('county', 'display')|raw}
         </li> {{endif}} 

Is there away to hide not just the content of the field but formatting as well?

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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