Steve,
Using CSS and HTML to set up tabs, I have been able to able to expand and collapse blocks of information that show up in the single-entry view of cMap. Here is an example: http://www.edrm.net/apersee/name/advanced-discovery
I am trying to figure out how to make a tab appear only if there is content. In the example, I want the “Phone” tab to appear as there is a phone number, drawn from the phone_numbers field, that should be displayed. I want the “Email” tab not to appear, as there is not entry in the email field for this entity’s record.
I have tried various permutations of the following but with no success:
if ($atts['show_email'] !== '') {
echo '';
echo '<input type="radio" name="tabs" id="tab5">';
echo '<label for="tab5">Email</label>';
echo '<div id="tab-content5" class="tab-content animated fadeIn">';
if ( $atts['show_email'] ) echo
$entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) );
echo '</div>';
echo ' ';
}
I suspect that my problem is with this line and that I should be using something other than show_email:
if ($atts['show_email'] !== '') {
Any suggestions?
Thanks,
George
